summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-05-01 10:44:14 +0300
committerLars Wirzenius <liw@liw.fi>2020-05-01 10:44:14 +0300
commit4e66dbfc2306acb2b6c9245178cd5262d39e03d2 (patch)
tree8be51fbdada1d49df38d356ada9c85decdec104a
parent048b2c99cf728eda66a6b584ea719b616e89246f (diff)
downloadansibleness-4e66dbfc2306acb2b6c9245178cd5262d39e03d2.tar.gz
Change: holywood2 borg-all script
-rwxr-xr-xansible/roles/holywood2/files/borg-all29
1 files changed, 22 insertions, 7 deletions
diff --git a/ansible/roles/holywood2/files/borg-all b/ansible/roles/holywood2/files/borg-all
index e3f5bac..804424d 100755
--- a/ansible/roles/holywood2/files/borg-all
+++ b/ansible/roles/holywood2/files/borg-all
@@ -2,16 +2,31 @@
ts="$(date +%Y-%m-%dT%H:%M:%S)"
-echo "Backing up /mnt/soile"
-./run-borg willikins /mnt/backups/borg create --stats ::"soile-$ts)" /mnt/soile/
+echo "Backing up /mnt/soile to nalanda"
+./run-borg liw-holywood@nalanda.liw.fi /home/liw-holywood/repo \
+ create --stats --progress ::"soile-$ts)" /mnt/soile/
-echo "Backing up /mnt/media"
-./run-borg willikins /mnt/backups/borg create --stats ::"media-$ts)" /mnt/media/
+echo "Pruning nalanda"
+./run-borg liw-holywood@nalanda.liw.fi /home/liw-holywood/repo \
+ prune --keep-with 100d
-echo "Backing up /mnt/liw-backups"
-./run-borg willikins /mnt/backups/borg create --stats ::"liw-$ts)" /mnt/liw-backups/
-echo "Pruning"
+
+echo "Backing up /mnt/soile to willikins"
+./run-borg willikins /mnt/backups/borg \
+ create --stats ::"soile-$ts)" /mnt/soile/
+
+echo "Backing up /mnt/media to willikins"
+./run-borg willikins /mnt/backups/borg \
+ create --stats ::"media-$ts)" /mnt/media/
+
+echo "Backing up /mnt/liw-backups to willikins"
+./run-borg willikins /mnt/backups/borg \
+ create --stats ::"liw-$ts)" /mnt/liw-backups/
+
+echo "Pruning willikins"
./run-borg willikins /mnt/backups/borg prune --keep-with 100d
+
+
echo "Backup finished"