summaryrefslogtreecommitdiff
path: root/ansible/roles/holywood2/files/borg-all
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/holywood2/files/borg-all')
-rwxr-xr-xansible/roles/holywood2/files/borg-all17
1 files changed, 17 insertions, 0 deletions
diff --git a/ansible/roles/holywood2/files/borg-all b/ansible/roles/holywood2/files/borg-all
new file mode 100755
index 0000000..bbc982a
--- /dev/null
+++ b/ansible/roles/holywood2/files/borg-all
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+ts="$(date +%Y-%m-%dT%H:%M:%S)"
+
+echo "Backing up /mnt/soile"
+./run-borg willikins /mnt/backups/borg create -p --stats ::"soile-$ts)" /mnt/soile/
+
+echo "Backing up /mnt/media"
+./run-borg willikins /mnt/backups/borg create -p --stats ::"media-$ts)" /mnt/media/
+
+echo "Backing up /mnt/liw-backups"
+./run-borg willikins /mnt/backups/borg create -p --stats ::"liw-$ts)" /mnt/liw-backups/
+
+echo "Pruning"
+./run-borg willikins /mnt/backups/borg prune --keep-with 100d
+
+echo "Backup finished"