diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-05-31 12:05:32 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-05-31 12:08:54 +0300 |
commit | 329677cc4c971308b4bdea2736f9c0c834f70b1b (patch) | |
tree | 1ca4f6ce39a0359d906d08fd256acc2c81a05484 /lib/beam | |
parent | e85656cb09fc8759fbd5731ed60915a0631eafb3 (diff) | |
download | beam-329677cc4c971308b4bdea2736f9c0c834f70b1b.tar.gz beam-329677cc4c971308b4bdea2736f9c0c834f70b1b.tar.bz2 |
Implement exclusion patterns and additional tar options in the fs module.
* lib/beam/fs.sh: (fs_backup): New keywords ITEM_tar_options,
ITEM_exclude and ITEM_exclude_files.
* doc/beam.conf.5in: Document new keywords.
* examples/Makefile.am: Remove.
* examples/backup.conf.s3: Remove.
* Makefile.am: Remove examples.
* configure.ac: Remove examples.
Diffstat (limited to 'lib/beam')
-rwxr-xr-x | lib/beam/fs.sh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/beam/fs.sh b/lib/beam/fs.sh index 6d7d4c7..024b761 100755 --- a/lib/beam/fs.sh +++ b/lib/beam/fs.sh @@ -57,19 +57,33 @@ fs_check() { # fs_backup item fs_backup() { - local basename text root files + local basename text root files exclude addopts s e basename=$1-$week-$round-$level eval text=\$${1}_text eval root=\$${1}_dir eval files=\$${1}_files + eval addopts=\$${1}_tar_options + + eval exclude=\$${1}_exclude + for e in $exclude + do + eval s="$e" + addopts="$addopts --exclude=$s" + done + + eval exclude=\$${1}_exclude_from + for e in $exclude + do + addopts="$addopts --exclude-from=$e" + done test -z "$root" && abend 1 "${1}_dir not set" test -z "$files" && abend 1 "${1}_files not set" test -z "$text" && text="$1" initdb $1 logit "backing up $text ($basename.$tar_suffix)" - $dry_run tar $verbose $taroptions \ + $dry_run tar $verbose $taroptions $addopts \ -f $backup_archive_dir/$basename.$tar_suffix \ --listed=$backup_snapshot_dir/$basename.db \ -C $root $files |