initial commit of file from CVS for e-smith-flexbackup on Wed 12 Jul 08:54:20 BST 2023
This commit is contained in:
15
root/etc/e-smith/templates/etc/flexbackup.conf/10AfioParams
Normal file
15
root/etc/e-smith/templates/etc/flexbackup.conf/10AfioParams
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
# ----------------------------------------------------------------------
|
||||
# Parameters for 'afio' only
|
||||
|
||||
# True to show block numbers}
|
||||
$afio_echo_block = 'false';
|
||||
{
|
||||
# Files less than this size (kilobytes) won't be compressed}
|
||||
$afio_compress_threshold = '3';
|
||||
{
|
||||
# Maximum amount of memory (megabytes) to use for temporary storage of
|
||||
# compression results. If a compressed file is bigger than this, compression
|
||||
# will have to run twice on the file (see manpage).}
|
||||
$afio_compress_cache_size = '2';
|
||||
|
13
root/etc/e-smith/templates/etc/flexbackup.conf/10Blocksize
Normal file
13
root/etc/e-smith/templates/etc/flexbackup.conf/10Blocksize
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
# Block size (k) to use (default for most things is 10)
|
||||
# mt_var_blksize says to use "variable" block size for the tape device
|
||||
# (mt setblk 0)
|
||||
# If false, will use the $blksize parameter above. All non-mt commands
|
||||
# will still use $blksize regardless of this value.
|
||||
my $blksize = $flexbackup{Blocksize} || '32';
|
||||
$OUT = '$blksize = "' . $blksize . '";';
|
||||
$OUT .= "\n";
|
||||
|
||||
my $mt_blksize = $flexbackup{TapeBlocksize} || '0';
|
||||
$OUT .= '$mt_blksize = "' . $mt_blksize . '";';
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{# Buffering}
|
||||
$buffer = '{ $flexbackup{BufferProg} || 'buffer' }'; {# name of buffer program to help streaming}
|
||||
$buffer_megs = '{ $flexbackup{BufferMegs} || '20' }'; {# buffer memory size (in megabytes)}
|
||||
$pad_blocks = 'true'; {# true to pad blocks to blocksize}
|
||||
|
@@ -0,0 +1,4 @@
|
||||
{# Compression}
|
||||
$compress = 'gzip'; {# one of false/gzip/bzip2/compress/hardware}
|
||||
$compr_level = '4'; {# compression level (1-9) (for gzip/bzip2/zip)}
|
||||
|
@@ -0,0 +1,6 @@
|
||||
{# ----------------------------------------------------------------------
|
||||
# Parameters for 'cpio' only
|
||||
|
||||
# Format of cpio archive}
|
||||
$cpio_format = 'newc';
|
||||
|
11
root/etc/e-smith/templates/etc/flexbackup.conf/10Device
Normal file
11
root/etc/e-smith/templates/etc/flexbackup.conf/10Device
Normal file
@@ -0,0 +1,11 @@
|
||||
{# Device to backup to - non-rewinding version please!
|
||||
#
|
||||
# Examples:
|
||||
# Linux SCSI: /dev/nst0 Linux IDE: /dev/nht0
|
||||
# Linux ftape: /dev/nqft0 FreeBSD SCSI: /dev/nrsa0
|
||||
#
|
||||
# If a directory, archive to files in that directory rather than a device
|
||||
#
|
||||
my $device = $backup{'Device'} || '/dev/nst0';
|
||||
$OUT .= "\$device = '$device';";
|
||||
}
|
11
root/etc/e-smith/templates/etc/flexbackup.conf/10DumpParams
Normal file
11
root/etc/e-smith/templates/etc/flexbackup.conf/10DumpParams
Normal file
@@ -0,0 +1,11 @@
|
||||
{# ----------------------------------------------------------------------
|
||||
# Parameters for 'dump' only
|
||||
|
||||
# Estimated tape size (in kilobytes). This number doesn't really do much
|
||||
# but help 'dump' get size estimates if set to zero uses 'dump -a'}
|
||||
$dump_length = '0';
|
||||
{
|
||||
# True to use /etc/dumpdates (could mess things up if you dump subdirectories
|
||||
# of mount points). False to use flexbackup's timestamps.}
|
||||
$dump_use_dumpdates = 'false';
|
||||
|
@@ -0,0 +1,6 @@
|
||||
# Set this to "true" to make erase operations just rewind - not really
|
||||
# call "mt erase". For some tape drives, erase takes hours rather
|
||||
# than seconds.
|
||||
$erase_rewind_only = '{
|
||||
$flexbackup{erase_rewind_only} || 'false'
|
||||
}';
|
@@ -0,0 +1,4 @@
|
||||
{# If true (default), level zero "set" assumes you want to erase and use
|
||||
# a new tape. If false, level zero "set" appends like all other backups}
|
||||
$erase_tape_set_level_zero = 'true';
|
||||
|
@@ -0,0 +1,8 @@
|
||||
{# Exclude files that match these *regular expressions* (not shell wildcards)
|
||||
# from the backups (no affect on 'dump' archives). You can list more than one,
|
||||
# just keep incrementing the index in the brackets for each. Also, strip off
|
||||
# leading directories (the filesystem specs above or the "-fs" flag).
|
||||
# Comment these out to exclude nothing.}
|
||||
$exclude_expr[0] = 'news/articles';
|
||||
$exclude_expr[1] = '.*~$'; {#'# single quote so emacs font-lock is happy}
|
||||
$exclude_expr[2] = './aquota.*';
|
9
root/etc/e-smith/templates/etc/flexbackup.conf/10Globals
Normal file
9
root/etc/e-smith/templates/etc/flexbackup.conf/10Globals
Normal file
@@ -0,0 +1,9 @@
|
||||
{# Other global flags}
|
||||
$remoteshell = 'ssh'; {# command for remote shell (rsh/ssh/ssh2)}
|
||||
$remoteuser = ''; {# secondary user name for remote shells (not set) }
|
||||
$label = 'true'; {# store identifying label in archive }
|
||||
$verbose = 'false'; {# echo each file? (for afio/tar/cpio/zip)}
|
||||
$sparse = 'true'; {# handle sparse files (for afio/tar/cpio)}
|
||||
$indexes = 'true'; {# false to turn off all table-of-contents support}
|
||||
$atime_preserve = 'true'; {# preserve access time (if possible) during backup }
|
||||
$staticfiles = 'false'; {# Use non-dated filename if backing up to file }
|
16
root/etc/e-smith/templates/etc/flexbackup.conf/10Logging
Normal file
16
root/etc/e-smith/templates/etc/flexbackup.conf/10Logging
Normal file
@@ -0,0 +1,16 @@
|
||||
{# ----------------------------------------------------------------------
|
||||
# Log/stamp files, path for temporary files
|
||||
}
|
||||
$staticlogs = "false"; {# use dated log files}
|
||||
$logdir = "/var/log/flexbackup"; {# directory for log files}
|
||||
$stampdir = "/var/state/flexbackup"; {# directory for backup timestamps}
|
||||
$index = "$stampdir/index"; {# DB filename for tape indexes}
|
||||
$comp_log = "gzip"; {# compress log? false/gzip/bzip2/compress}
|
||||
$prefix = ""; {# log files will start with this prefix}
|
||||
$sprefix = ""; {# stamp files will start with this prefix}
|
||||
$tmpdir = "/tmp"; {# used for temporary refdate files, etc}
|
||||
{
|
||||
# Why do I suggest /var/state/flexbackup for the stamp/indexes?
|
||||
# See the FHS, http://www.pathname.com/fhs/2.0/fhs-5.11.html
|
||||
# BSD users probably want /var/db/flexbackup
|
||||
}
|
5
root/etc/e-smith/templates/etc/flexbackup.conf/10MtTell
Normal file
5
root/etc/e-smith/templates/etc/flexbackup.conf/10MtTell
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
$OUT =<<'HERE';
|
||||
$mt{'tell'} = 'status';
|
||||
HERE
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
{# File extensions that should not be compressed (seperate with spaces)
|
||||
# For afio and zip only (since they do each file individually)}
|
||||
$nocompress_types = 'mp3 Z z gz gif zip lha jpeg jpg taz tgz deb rpm bz2';
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{# ----------------------------------------------------------------------
|
||||
# Parameters for 'tar' only
|
||||
|
||||
# True to show record numbers}
|
||||
$tar_echo_record_num = 'false';
|
||||
{
|
||||
# True to preserve file access times}
|
||||
$tar_atime_preserve = 'true';
|
||||
|
@@ -0,0 +1,4 @@
|
||||
{# Span across filesytems? ("dump" will ignore this option)
|
||||
# Set to "false" (don't) , "local" (all but nfs), or "all" (everything)}
|
||||
$traverse_fs = 'false';
|
||||
|
@@ -0,0 +1,4 @@
|
||||
{# ----------------------------------------------------------------------
|
||||
# Parameters for 'zip' only
|
||||
|
||||
}
|
31
root/etc/e-smith/templates/etc/flexbackup.conf/10filesystems
Normal file
31
root/etc/e-smith/templates/etc/flexbackup.conf/10filesystems
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
# 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;
|
||||
}
|
||||
|
10
root/etc/e-smith/templates/etc/flexbackup.conf/10prune_tree
Normal file
10
root/etc/e-smith/templates/etc/flexbackup.conf/10prune_tree
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
my @prunelist = split(',', $flexbackup{Prune} || '');
|
||||
|
||||
return "" unless (scalar @prunelist);
|
||||
|
||||
$OUT = '$prune';
|
||||
$OUT .= "{'/'} = '";
|
||||
$OUT .= join(' ', @prunelist);
|
||||
$OUT .= "';";
|
||||
}
|
4
root/etc/e-smith/templates/etc/flexbackup.conf/10type
Normal file
4
root/etc/e-smith/templates/etc/flexbackup.conf/10type
Normal file
@@ -0,0 +1,4 @@
|
||||
$type = '{# Archive type? afio, dump, tar, cpio, or zip
|
||||
my $type = $flexbackup{Type} || 'tar';
|
||||
$OUT = "$type";
|
||||
}';
|
Reference in New Issue
Block a user