summaryrefslogtreecommitdiff
path: root/bin/bak-biz.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/bak-biz.sh')
-rwxr-xr-xbin/bak-biz.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/bak-biz.sh b/bin/bak-biz.sh
new file mode 100755
index 0000000..0a7ac0b
--- /dev/null
+++ b/bin/bak-biz.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+# ----------------------------------------------------------------------
+# rotating-filesystem-snapshot utility
+# essentially, rotate backup-snapshots of /home
+# on a weekly basis using rsync and cron
+# ----------------------------------------------------------------------
+
+
+rm -rf /mnt/backup/week.4
+mv /mnt/backup/week.3 /mnt/backup/week.4
+mv /mnt/backup/week.2 /mnt/backup/week.3
+mv /mnt/backup/week.1 /mnt/backup/week.2
+mv /mnt/backup/week.0 /mnt/backup/week.1
+rsync -avvz ~/business/ \
+--delete-after \
+--exclude-from '/home/lxf/.rsync-exclude' \
+--link-dest=/mnt/backup/week.1 \
+ /mnt/backup/week.0/