diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-07-04 13:42:15 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-07-04 13:42:15 +0300 |
commit | dd89ed279f6948fab60319262ffc4d25da8ecd10 (patch) | |
tree | 8b37d8a6815742fd5ec6a0a7174cfde4e889ff8f | |
parent | ccb9742c80519ef29d2a529397011dd718613005 (diff) | |
download | beam-dd89ed279f6948fab60319262ffc4d25da8ecd10.tar.gz beam-dd89ed279f6948fab60319262ffc4d25da8ecd10.tar.bz2 |
Minor improvement.
* lib/beam/fs.sh: Fall back to level 0 if the previous
snapshot file does not exist. This allows to add new
items in the middle of the week.
-rwxr-xr-x | lib/beam/fs.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/beam/fs.sh b/lib/beam/fs.sh index 28f4855..6c09e61 100755 --- a/lib/beam/fs.sh +++ b/lib/beam/fs.sh @@ -37,8 +37,9 @@ initdb() { if [ -r $filename ]; then cp $filename $backup_snapshot_dir/$1-$week-$round-$level.db else - abend 1 "previous snapshot file $filename not found; cannot backup at level $level" - exit 1 + filename=$backup_snapshot_dir/$1-$week-$round-$level.db + test -r $filename && rm $filename + logit "previous snapshot file $filename not found; falling back to level 0" fi fi } |