From 82df70eff06e7b44ee84283070d7f801f7fc1d92 Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sat, 6 Nov 2021 20:25:45 -0400 Subject: initial commit --- .local/bin/backups/borg-offsite | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 .local/bin/backups/borg-offsite (limited to '.local/bin/backups/borg-offsite') 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 @@ +#!/bin/sh +# Full system backup with Borg + +# Backup root partition +sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \ + --exclude '/dev/*' \ + --exclude '/proc/*' \ + --exclude '/sys/*' \ + --exclude '/tmp/*' \ + --exclude '/mnt/*' \ + --exclude '/media/*' \ + "/mnt/offsite-backup/titan::root-{now:%Y-%m-%d}" / + +# Backup boot parition +sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \ + "/mnt/offsite-backup/titan::boot-{now:%Y-%m-%d}" /boot + +# Backup home partition +sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \ + "/mnt/offsite-backup/titan::home-{now:%Y-%m-%d}" /home + +# Backup var partition +sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \ + "/mnt/offsite-backup/titan::var-{now:%Y-%m-%d}" /var + -- cgit v1.2.3