diff options
| author | Sam Chudnick <sam@chudnick.com> | 2021-11-28 23:13:19 -0500 |
|---|---|---|
| committer | Sam Chudnick <sam@chudnick.com> | 2021-11-28 23:13:19 -0500 |
| commit | 5c9df935636c6b5610a0d1f2bf3ed8dfcd10c856 (patch) | |
| tree | 8e55a2de0a3b7338ad92ffe5ae59b6012397e715 /.local/bin/backups/borg-offsite | |
| parent | a337727e0577b43ae03bfc94a84f50c09a320d13 (diff) | |
Combined borg-onsite and borg-offsite scripts into a single script that takes an argument to specify the location. Reorganized script to use variables to reduce redundant strings. Added automated retrieval of repository password via pass. Removed --list from borg create options and redirect output to log file.
Diffstat (limited to '.local/bin/backups/borg-offsite')
| -rwxr-xr-x | .local/bin/backups/borg-offsite | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/.local/bin/backups/borg-offsite b/.local/bin/backups/borg-offsite deleted file mode 100755 index dfc9c01..0000000 --- a/.local/bin/backups/borg-offsite +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # Full system backup with Borg | ||
| 3 | |||
| 4 | # Backup root partition | ||
| 5 | sudo 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 | ||
| 15 | sudo 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 | ||
| 19 | sudo 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 | ||
| 23 | sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \ | ||
| 24 | "/mnt/offsite-backup/titan::var-{now:%Y-%m-%d}" /var | ||
| 25 | |||
