smeserver-flexbackup/root/etc/e-smith/templates/etc/flexbackup.conf/10filesystems

32 lines
853 B
Plaintext

{
# List the filesystems you wish to dump when 'all' is given
# Just a simple space-separated list
# Remote filesystems should denoted as 'host:dir'
#
# Example:
# $filesystems[0] = '/ /usr /home machine1:/usr machine2:/home';
#
# If you want an 'all' level 0 backup to span multiple tapes, add more lines
# You will be prompted for tape change in between.
#
my @filesys = ();
my $outstring;
open(FSTAB, "</etc/fstab") or die "Can't open fstab file";
while (<FSTAB>)
{
/\S+\s+(\S+)\s+(\S+)\s+(\S+)/ &&
($2 eq "ext2" or $2 eq "ext3" or $2 eq "ext4" or $2 eq "xfs") &&
$3 !~ /(?:noauto|loop)/ &&
$1 !~ /^\/var\/spool\/squid/ &&
$1 !~ /^\/boot$/ &&
push @filesys, $1;
}
close FSTAB;
$outstring = "\$set{'full'} = '";
$outstring .= join(' ', @filesys);
$outstring .= "';";
$outstring;
}