Add borg command for home backups
also switch to lzma,9 compression
This commit is contained in:
parent
6c31a7c09e
commit
4163da8b38
@ -1,7 +1,14 @@
|
||||
alias borg-backup="sudo borg create \
|
||||
/run/media/adam/Backup/borg-backups::`hostname`-\`date +%Y-%m-%d\` \
|
||||
--compression zlib,5 -p \
|
||||
/home/adam/ \
|
||||
/etc/ \
|
||||
--exclude-caches \
|
||||
--exclude-from ~/Documents/backuplist.txt"
|
||||
#!/bin/zsh
|
||||
# borg
|
||||
|
||||
backupName='{hostname}-{now:%Y-%m-%d}'
|
||||
borgArgs="--compression lzma,9 \
|
||||
--progress \
|
||||
--exclude-caches \
|
||||
--exclude-from ~/Documents/backuplist.txt"
|
||||
backupTargets="/home/adam/ /etc/"
|
||||
|
||||
alias borg-backup="sudo borg create /run/media/adam/Backup/borg-backups::$backupName $backupTargets $borgArgs"
|
||||
alias borg-backup-home="sudo BORG_RSH='sudo -u adam ssh' borg create thewarehouse:borg-backups::$backupName $backupTargets $borgArgs --ignore-inode --remote-path /var/services/homes/adam/bin/borg"
|
||||
|
||||
unset backupName borgArgs backupTargets
|
||||
|
Loading…
Reference in New Issue
Block a user