Index: duply.sh =================================================================== --- duply.sh (revision 29) +++ duply.sh (working copy) @@ -37,6 +37,9 @@ # e.g. backup_AND_verify_AND_purge, pre_and_bkp_and_post # - import/export profile from/to .tgz function !!! # +# UNRELEASED: +# - purge-inc command for remove-all-inc-of-but-n-full feature added +# # CHANGELOG: # 1.5.10 (26.03.2013) # - minor indent and documentation fixes @@ -631,6 +634,10 @@ # See duplicity man page, action "remove-all-but-n-full". #MAX_FULL_BACKUPS=1 +# Number of incremental sets to keep, Used for the "purge-inc" command. +# See duplicity man page, action "remove-all-inc-of-but-n-full". +# MAX_INC_BACKUP_SETS=1 + # activates duplicity --full-if-older-than option (since duplicity v0.4.4.RC3) # forces a full backup if last full backup reaches a specified age, for the # format of MAX_FULLBKP_AGE see duplicity man page, chapter TIME_FORMATS @@ -1874,6 +1881,13 @@ duplify remove-all-but-n-full "${MAX_FULL_BACKUPS}" \ -- "address@hidden" "$BACKEND_URL" ;; + purge-inc) + MAX_INC_BACKUP_SETS=${ftpl_pars[0]:-$MAX_INC_BACKUP_SETS} + [ -z "$MAX_INC_BACKUP_SETS" ] && error " Missing parameter . Can be set in profile or as command line parameter." + + duplify remove-all-inc-of-but-n-full "${MAX_INC_BACKUP_SETS}" \ + -- "address@hidden" "$BACKEND_URL" + ;; restore) OUT_PATH="${ftpl_pars[0]}"; TIME="${ftpl_pars[1]:-now}"; [ -z "$OUT_PATH" ] && error " Missing parameter target_path for restore.