summaryrefslogtreecommitdiff
path: root/.local/bin/backups
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/backups')
-rwxr-xr-x.local/bin/backups/borg-offsite25
-rwxr-xr-x.local/bin/backups/borg-onsite25
2 files changed, 50 insertions, 0 deletions
diff --git a/.local/bin/backups/borg-offsite b/.local/bin/backups/borg-offsite
new file mode 100755
index 0000000..dfc9c01
--- /dev/null
+++ b/.local/bin/backups/borg-offsite
@@ -0,0 +1,25 @@
1#!/bin/sh
2# Full system backup with Borg
3
4# Backup root partition
5sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \
6 --exclude '/dev/*' \
7 --exclude '/proc/*' \
8 --exclude '/sys/*' \
9 --exclude '/tmp/*' \
10 --exclude '/mnt/*' \
11 --exclude '/media/*' \
12 "/mnt/offsite-backup/titan::root-{now:%Y-%m-%d}" /
13
14# Backup boot parition
15sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \
16 "/mnt/offsite-backup/titan::boot-{now:%Y-%m-%d}" /boot
17
18# Backup home partition
19sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \
20 "/mnt/offsite-backup/titan::home-{now:%Y-%m-%d}" /home
21
22# Backup var partition
23sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \
24 "/mnt/offsite-backup/titan::var-{now:%Y-%m-%d}" /var
25
diff --git a/.local/bin/backups/borg-onsite b/.local/bin/backups/borg-onsite
new file mode 100755
index 0000000..658c425
--- /dev/null
+++ b/.local/bin/backups/borg-onsite
@@ -0,0 +1,25 @@
1#!/bin/sh
2# Full system backup with Borg
3
4# Backup root partition
5sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \
6 --exclude '/dev/*' \
7 --exclude '/proc/*' \
8 --exclude '/sys/*' \
9 --exclude '/tmp/*' \
10 --exclude '/mnt/*' \
11 --exclude '/media/*' \
12 "/mnt/onsite-backup/titan::root-{now:%Y-%m-%d}" /
13
14# Backup boot parition
15sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \
16 "/mnt/onsite-backup/titan::boot-{now:%Y-%m-%d}" /boot
17
18# Backup home partition
19sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \
20 "/mnt/onsite-backup/titan::home-{now:%Y-%m-%d}" /home
21
22# Backup var partition
23sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \
24 "/mnt/onsite-backup/titan::var-{now:%Y-%m-%d}" /var
25