summaryrefslogtreecommitdiff
path: root/ansible/roles/holywood2/files/borg-all
blob: 71326043a4bc454746e355a391a08548d4fffdce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

ts="$(date +%Y-%m-%dT%H:%M:%S)"

echo "Backing up /mnt/soile to nalanda"
./run-borg liw-holywood@nalanda.liw.fi /home/liw-holywood/repo \
           create --stats ::"soile-$ts)" /mnt/soile/

echo "Pruning nalanda"
echo ./run-borg liw-holywood@nalanda.liw.fi /home/liw-holywood/repo \
           prune --keep-with 100d



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"