Permalink
Browse files

New branch. Goal: optional rollback when rsync fails

  • Loading branch information...
1 parent afedb40 commit 647eb3ec4c9d35fd7439a45b6ea48fa04d77f484 @falconindy committed Jan 18, 2010
Showing with 11 additions and 0 deletions.
  1. +1 −0 README
  2. +4 −0 squashfu
  3. +6 −0 squashfu.conf
View
1 README
@@ -118,3 +118,4 @@ In no particular order....
- Fix output funcs for non-color scenario
- Add semantic error checking for config
- Create man page
+- Make config more helpful by providing possible values, not just verbiage
View
@@ -260,6 +260,10 @@ action_backup () {
create_new_incremental
+ if [[ $? -gt 0 && $DEL_BIN_ON_FAIL == "true" ]]; then
+ # Remove the physical bin and edit binlist
+ fi
+
check_for_resquash
if [[ val=$? -gt 0 ]]; then
create_new_squash $val
View
@@ -40,6 +40,12 @@ MIN_BINS=5
# Depending on how big your total backup size is, this may not be wise.
MAX_BINS=10
+# If rsync returns anything but a 0, the backup is considered to be
+# aborted before completion (or never started). Set this to be 'true'
+# if you want the newly created bin to be removed when an rsync failure
+# is detected.
+DEL_BIN_ON_FAIL=false
+
# These are the options that are passed directly to rsync.
# The -u flag is a necessity, or else incrementals will
# not be true incrementals. See 'man rsync' for more info.

0 comments on commit 647eb3e

Please sign in to comment.