View | Details | Raw Unified
Collapse All | Expand All

(-) flexbackup-old/flexbackup (-9 / +8 lines)
 Lines 3085-3091    Link Here 
	    $::read_cmd = "$bufcmd $read_flags";
	    $::read_cmd = "$bufcmd $read_flags";
	} elsif ($cfg::buffer eq "mbuffer") {
	} elsif ($cfg::buffer eq "mbuffer") {
	    $::path{'mbuffer'} = &checkinpath('mbuffer');
	    $::path{'mbuffer'} = &checkinpath('mbuffer');
	    push(@::remoteprogs, $::path{'mbuffer'});
	    push(@::remoteprogs, $::path{'mbuffer'});
 Lines 3101-3107    Link Here 
	    }
	    }
	}
	}
    } else {
    } else {
	# If buffering disabled, use dd or cat depending on if blocking turned off on not
	# If buffering disabled, use dd or cat depending on if blocking turned off on not
	if ($cfg::blksize eq '0') {
	if ($cfg::blksize eq '0') {
	    $::buffer_cmd = "";
	    $::buffer_cmd = "";
 Lines 4887-4904    Link Here 
		my $rex;
		my $rex;
	# FreeBSD needs -E (above) and no backslashes around the (|) chars
	# FreeBSD needs -E (above) and no backslashes around the (|) chars
	if ($::uname =~ /FreeBSD/) {
	if ($::uname =~ /FreeBSD/) {
			$rex  = '-regex "\./(';
			$rex  = '"\./(';
			$rex .= join('|', keys %{$::prune{$prunekey}});
			$rex .= join('|', keys %{$::prune{$prunekey}});
			$rex .= ')/.*" ';
			$rex .= ')"';
		} else {
		} else {
			$rex  = '-regex "\./\(';
			$rex  = '"\./\(';
			$rex .= join('\|', keys %{$::prune{$prunekey}});
			$rex .= join('\|', keys %{$::prune{$prunekey}});
			$rex .= '\)/.*" ';
			$rex .= '\)"';
		}
		}
		# Show what the darn thing is constructing for prune expressions.
		# Show what the darn thing is constructing for prune expressions.
		&log("| \"find\" regex for pruning is: $rex");
		&log("| \"find\" regex for pruning is:");
		$cmd .= $rex;
		&log("|     $rex");
	$cmd .= '-prune -o ';
		&line();
		$cmd .= '-regex ' . $rex . ' -prune -o ';
    } else {
    } else {
		# Show what the darn thing is constructing for prune expressions.
		# Show what the darn thing is constructing for prune expressions.
		&log("| No pruning defined for this tree.");
		&log("| No pruning defined for this tree.");
(-) flexbackup-old/flexbackup.1 (-1 / +1 lines)
 Lines 48-54    Link Here 
Extract (restore) the files listed in text file \(dqfilelist\(dq into your
Extract (restore) the files listed in text file \(dqfilelist\(dq into your
current working directory.
current working directory.
.TP
.TP
\fBflexbackup\fR \fI-extract\fR \fI-flist\fR <\fIfilename\fR>
\fBflexbackup\fR \fI-extract\fR \fI-onefile\fR <\fIfilename\fR>
Extract (restore) the single file named \(dqfilename\(dq into your current
Extract (restore) the single file named \(dqfilename\(dq into your current
working directory.
working directory.
.TP
.TP
(-) flexbackup-old/flexbackup.conf (-10 / +19 lines)
 Lines 28-37    Link Here 
# Subtree pruning
# Subtree pruning
# A space-separated list of directories to prune from each backup.
# A space-separated list of directories to prune from each backup.
# Key is a filesystem or host:dir spec as outlined above
# Key is a filesystem or host:dir spec as outlined above.
# regular expressions allowed (not shell-type wildcards!)
# Regular expressions are allowed (not shell-type wildcards!)
#
#
# Note:  These directories are actually regular expressions and must
# Note:  These "directories" are actually regular expressions and must
# match "find" output relative to the path of the current backup set. This
# match "find" output relative to the path of the current backup set. This
# means that different exclusions are needed for different backup sets.
# means that different exclusions are needed for different backup sets.
# This is a little tricky, so, read on.
# This is a little tricky, so, read on.
 Lines 46-54    Link Here 
#
#
# then, the constructed -regex argument to "find" looks like this
# then, the constructed -regex argument to "find" looks like this
#
#
#     -regex "\./\(one\|two\|three\)/.*"
#     -regex "\./(one|two|three)"
#
#
# The last thing you need to know is that FlexBackup only uses the prune
# (with characters escaped as necessary depending on your environment).
#
# Another thing you need to know is that FlexBackup only uses the prune
# terms that match the current base directory in the set you're backing
# terms that match the current base directory in the set you're backing
# up.  For example, if your backup set definition looks like this
# up.  For example, if your backup set definition looks like this
#
#
 Lines 66-74    Link Here 
#
#
#     $prune{'/'} = "home/bert home/ernie var/tmp";
#     $prune{'/'} = "home/bert home/ernie var/tmp";
#
#
# does not work, unless, of course, your backup set is backing up "/", 
# doesn't work, unless, of course, your backup set is backing up "/", 
# which our example is not.
# which our example is not.
#
#
# Many other complex and abstruse variations are possible.  Here's one 
# interesting corner case.  If you want to preserve a directory but none of its
# contents, you can do it.  Picking on ernie from our previous example, preserve
# only his home directory:
#
#     $prune{'/home'} = "ernie/.*";
#
$prune{'/'} = "tmp proc";
$prune{'/'} = "tmp proc";
# Compression
# Compression
 Lines 138-147    Link Here 
# Matches paths, not filenames, so put .* on the front/back as needed.
# Matches paths, not filenames, so put .* on the front/back as needed.
# Comment these out to exclude nothing.
# Comment these out to exclude nothing.
# 
# 
# Note:  The first example line breaks portage in a restored backup because
# Gentoo note:  The first example line breaks portage in a restored backup 
# "/usr/lib/portage/pym/cache" is not backed up.  Way too general!  The moral
# because "/usr/lib/portage/pym/cache" is not backed up.  Way too general!
# of this story is, be very careful with global excludes.  The second example 
# The moral of this story is, be very careful with global excludes.  The 
# is probably okay.
# second example is probably okay.
# $exclude_expr[0] = '.*/[Cc]ache/.*';
# $exclude_expr[0] = '.*/[Cc]ache/.*';
# $exclude_expr[1] = '.*~$';
# $exclude_expr[1] = '.*~$';
(-) flexbackup-old/flexbackup.conf.5 (-1 / +3 lines)
 Lines 40-46    Link Here 
\fB$prune{\fI'/'\fR}\fR = \fI'tmp proc'\fR;
\fB$prune{\fI'/'\fR}\fR = \fI'tmp proc'\fR;
Configure subtree pruning. A space-separated list of directories to prune from
Configure subtree pruning. A space-separated list of directories to prune from
each backup. Key is a filesystem/directory or \(dqhost:directory\(dq spec as
each backup. Key is a filesystem/directory or \(dqhost:directory\(dq spec as
outlined above regular expressions allowed (not shell-type wildcards!).
outlined above. Regular expressions allowed (not shell-type wildcards!). There
is additional explanation (and a lot of examples) in the provided configuration
file.
.TP
.TP
\fB$compress\fR = \fI'false|gzip|bzip2|lzop|zip|compress|hardware'\fR;
\fB$compress\fR = \fI'false|gzip|bzip2|lzop|zip|compress|hardware'\fR;
.TQ
.TQ