diff options
author | luxagraf <sng@luxagraf.net> | 2020-02-16 15:51:21 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2020-02-16 15:51:21 -0500 |
commit | 3165ef5abdb298108efa2ba3d339f70ca966315a (patch) | |
tree | ef882420caca6e063b87a20dd1a8b00f89fd5ffc /bin/bak-docs.sh | |
parent | cd507c92f617d4a8a3f7bb0b43e425491ef7184d (diff) |
fixed a few bugs importing old files
Diffstat (limited to 'bin/bak-docs.sh')
-rwxr-xr-x | bin/bak-docs.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/bak-docs.sh b/bin/bak-docs.sh new file mode 100755 index 0000000..332ce6f --- /dev/null +++ b/bin/bak-docs.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# ---------------------------------------------------------------------- +# rotating-filesystem-snapshot utility +# essentially, rotate docbak-snapshots of /home +# on a weekly basis using rsync and cron +# ---------------------------------------------------------------------- + + +rm -rf /mnt/docbak/week.4 +mv /mnt/docbak/week.3 /mnt/docbak/week.4 +mv /mnt/docbak/week.2 /mnt/docbak/week.3 +mv /mnt/docbak/week.1 /mnt/docbak/week.2 +mv /mnt/docbak/week.0 /mnt/docbak/week.1 +rsync -avvz /mnt/storage/documents/ \ +--delete-after \ +--exclude-from '/home/lxf/.rsync-exclude' \ +--link-dest=/mnt/docbak/week.1 \ + /mnt/docbak/week.0/ |