summaryrefslogtreecommitdiff
path: root/d-backup
diff options
context:
space:
mode:
Diffstat (limited to 'd-backup')
-rwxr-xr-xd-backup12
1 files changed, 10 insertions, 2 deletions
diff --git a/d-backup b/d-backup
index 46d64a4..77361d9 100755
--- a/d-backup
+++ b/d-backup
@@ -21,6 +21,7 @@ print_help() {
cat <<EOF
Commands:
backup run backup
+ cleanup cleanup
stats show collection status
list list files from backup
restore restore files from backup
@@ -30,12 +31,16 @@ EOF
}
backup() {
- duplicity cleanup --force "$TARGET"
- duplicity remove-all-but-n-full 3 --force "$TARGET"
nice ionice duplicity \
--exclude-filelist "$HOME/.duplicity-exclude" \
--full-if-older-than 2M \
"$SOURCE" "$TARGET"
+ cleanup
+}
+
+cleanup() {
+ duplicity cleanup --force "$TARGET"
+ duplicity remove-all-but-n-full 3 --force "$TARGET"
}
stats() {
@@ -60,6 +65,9 @@ while (( "$#" )) ; do
backup)
backup
;;
+ cleanup)
+ cleanup
+ ;;
stats)
stats
;;