Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add BACKUPDIRS_ONEFS configuration variable

backup these paths withous crossing file-system boundaries
  • Loading branch information...
commit eca5856553799875adbb05ef3b0a84f2da0b8b82 1 parent 8e11189
@mmitch authored
View
18 bugs/issue-2174f8396804d44746fcb859b373c71cb499c023.yaml
@@ -1,12 +1,12 @@
--- !ditz.rubyforge.org,2008-03-06/issue
-title: optionally don't cross filesystem borders
+title: optionally don't cross filesystem borders (BACKUPDIRS_ONEFS)
desc: add an option to make the recursive folder copy stop at a filesystem boundary
type: :feature
component: simplebackup
release: 0.1.3
reporter: Christian Garbs <mitch@cgarbs.de>
-status: :unstarted
-disposition:
+status: :closed
+disposition: :fixed
creation_time: 2009-05-13 06:43:00.556324 Z
references: []
@@ -16,3 +16,15 @@ log_events:
- Christian Garbs <mitch@cgarbs.de>
- created
- ""
+- - 2009-05-16 15:42:11.639000 Z
+ - Christian Garbs <mitch@cgarbs.de>
+ - changed status from unstarted to in_progress
+ - ""
+- - 2009-05-16 16:44:44.538432 Z
+ - Christian Garbs <mitch@cgarbs.de>
+ - edited title
+ - ""
+- - 2009-05-16 16:47:51.595009 Z
+ - Christian Garbs <mitch@cgarbs.de>
+ - closed with disposition fixed
+ - ""
View
9 simplebackup
@@ -134,6 +134,15 @@ for DIR in $BACKUPDIRS; do
echo_err "$DIR is no directory!"
fi
done
+for DIR in $BACKUPDIRS_ONEFS; do
+ if [ -d "$CHROOT$DIR" ]; then
+ echo_info "backing up $DIR (one fs)"
+ mkdir -p "$WORKDIR$DIR"
+ (cd "$CHROOT$DIR" ; tar -c --one-file-system .) | (cd "$WORKDIR$DIR" ; tar -x)
+ else
+ echo_err "$DIR is no directory!"
+ fi
+done
IFS="$OLDIFS"
# execute extra commands after copying
View
10 simplebackup.conf
@@ -21,11 +21,19 @@ WORKDIR=$TARGETDIR/tmp
#
# These paths and their subdirectories are to be backed up.
+# File system boundaries will be crossed.
# Use : to separate multiple paths.
#
BACKUPDIRS='/boot:/etc:/root:/var/backups:/var/games:/var/lib/amavis-stats:/var/lib/aptitude:/var/lib/cvs:/var/lib/dpkg:/var/lib/mailman:/var/lib/news:/var/lib/ucf:/var/lib/usemod-wiki:/var/log:/var/mail:/var/spool/cron:/lib/firmware:/usr/local/lib/firmware:/usr/lib/hotplug/firmware'
#
+# These paths and their subdirectories are to be backed up.
+# Processing of subdirectories will not cross file system boundaries.
+# Use : to separate multiple paths.
+#
+BACKUPDIRS_ONEFS=''
+
+#
# This is the name of the backup. It is later prepended
# with a timestamp.
#
@@ -48,7 +56,7 @@ NICELEVEL=20
#
# Chroot path.
# If you want to backup another system that is reachable via
-# your filesystem, you have to point this variable to the other
+# your file system, you have to point this variable to the other
# system's root directory. Leave empty for normal operation.
#
CHROOT=
View
12 simplebackup.conf.in.5
@@ -30,8 +30,14 @@ deleted on startup, so don't point to anyting important.
.TP
\fIBACKUPDIRS\fR
-These paths and their subdirectories are to be backed up. Use : to
-separate multiple paths.
+These paths and their subdirectories are to be backed up while
+crossing file system boundaries. Use : to separate multiple paths.
+
+.TP
+\fIBACKUPDIRS_ONEFS\fR
+These paths and their subdirectories are to be backed up. No
+file system boundaries will be crossed. Use : to separate multiple
+paths.
.TP
\fINAME\fR
@@ -52,7 +58,7 @@ priority (only root can do this).
.TP
\fICHROOT\fR
Chroot path. If you want to backup another system that is reachable
-via your filesystem, you have to point this variable to the other
+via your file system, you have to point this variable to the other
system's root directory. Leave empty for normal operation.
.SH "FUNCTIONS"
.TP
View
2  testrc
@@ -19,6 +19,8 @@ WORKDIR=$TARGETDIR/tmp
#
BACKUPDIRS='/boot:/etc:/root:/var/backups:/var/games:/var/lib/amavis-stats:/var/lib/aptitude:/var/lib/cvs:/var/lib/mailman:/var/lib/news:/var/lib/ucf:/var/lib/usemod-wiki:/var/log:/var/mail:/var/spool/cron'
+BACKUPDIRS_ONEFS='/dev'
+
#
# This is the name of the backup. It is later prepended
# with a timestamp.
Please sign in to comment.
Something went wrong with that request. Please try again.