add backups from laptop
This commit is contained in:
parent
6158a0967d
commit
cc300b7395
166
local/bin/backup
166
local/bin/backup
@ -8,65 +8,113 @@ trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM
|
|||||||
|
|
||||||
info "Starting backup"
|
info "Starting backup"
|
||||||
|
|
||||||
borg create \
|
case "$(hostname)" in
|
||||||
--verbose \
|
mantle)
|
||||||
--filter AME \
|
borg create \
|
||||||
--list \
|
--verbose \
|
||||||
--stats \
|
--filter AME \
|
||||||
--show-rc \
|
--list \
|
||||||
--compression lz4 \
|
--stats \
|
||||||
--exclude-caches \
|
--show-rc \
|
||||||
--exclude '/etc/sv/*/supervise' \
|
--compression lz4 \
|
||||||
--exclude '/etc/sudoers' \
|
--exclude-caches \
|
||||||
--exclude '/etc/securetty' \
|
--exclude '/etc/sv/*/supervise' \
|
||||||
--exclude '/etc/wpa_supplicant/wpa_supplicant.conf' \
|
--exclude '/etc/sudoers' \
|
||||||
--exclude '/etc/sudoers.dist' \
|
--exclude '/etc/securetty' \
|
||||||
--exclude '/etc/kernel.d/post-install/50-grub' \
|
--exclude '/etc/wpa_supplicant/wpa_supplicant.conf' \
|
||||||
--exclude '/etc/kernel.d/post-remove/50-grub' \
|
--exclude '/etc/sudoers.dist' \
|
||||||
--exclude '/etc/.pwd.lock' \
|
--exclude '/etc/kernel.d/post-install/50-grub' \
|
||||||
--exclude '/etc/gshadow-' \
|
--exclude '/etc/kernel.d/post-remove/50-grub' \
|
||||||
--exclude '/etc/passwd-' \
|
--exclude '/etc/.pwd.lock' \
|
||||||
--exclude '/etc/shadow-' \
|
--exclude '/etc/gshadow-' \
|
||||||
--exclude '/etc/shadow' \
|
--exclude '/etc/passwd-' \
|
||||||
--exclude '/etc/gshadow' \
|
--exclude '/etc/shadow-' \
|
||||||
--exclude '/var/tmp/*' \
|
--exclude '/etc/shadow' \
|
||||||
--exclude '/var/db/*' \
|
--exclude '/etc/gshadow' \
|
||||||
--exclude '/var/cache' \
|
--exclude '/var/tmp/*' \
|
||||||
--exclude '/var/lib/alsa' \
|
--exclude '/var/db/*' \
|
||||||
--exclude '/var/lib/tor' \
|
--exclude '/var/cache' \
|
||||||
--exclude '/var/lib/random-seed' \
|
--exclude '/var/lib/alsa' \
|
||||||
--exclude '/var/log/tallylog' \
|
--exclude '/var/lib/tor' \
|
||||||
--exclude '/var/log/btmp' \
|
--exclude '/var/lib/random-seed' \
|
||||||
--exclude '/var/log/dmesg.log' \
|
--exclude '/var/log/tallylog' \
|
||||||
--exclude '/var/log/faillog' \
|
--exclude '/var/log/btmp' \
|
||||||
--exclude '/data/homes/*' \
|
--exclude '/var/log/dmesg.log' \
|
||||||
--exclude '/data/mail/*/.uidvalidity' \
|
--exclude '/var/log/faillog' \
|
||||||
--exclude '/data/music/*' \
|
--exclude '/data/homes/*' \
|
||||||
--exclude '/data/pictures/*' \
|
--exclude '/data/mail/*/.uidvalidity' \
|
||||||
--exclude '/data/torrents/*' \
|
--exclude '/data/music/*' \
|
||||||
--exclude '/home/*/.ssh/control*' \
|
--exclude '/data/pictures/*' \
|
||||||
--exclude '/home/*/services/*/supervise' \
|
--exclude '/data/torrents/*' \
|
||||||
--exclude '*/.git/*' \
|
--exclude '/home/*/.ssh/control*' \
|
||||||
--exclude '*/.stack-work/*' \
|
--exclude '/home/*/services/*/supervise' \
|
||||||
--exclude '*/lock' \
|
--exclude '*/.git/*' \
|
||||||
--exclude '*/.mbsyncstate*' \
|
--exclude '*/.stack-work/*' \
|
||||||
--exclude '*/target/*' \
|
--exclude '*/lock' \
|
||||||
--exclude '*/build/*' \
|
--exclude '*/.mbsyncstate*' \
|
||||||
--exclude '/data/programming/void-packages/*' \
|
--exclude '*/target/*' \
|
||||||
--exclude '/data/programming/SP-Flash-Tool-src/*' \
|
--exclude '*/build/*' \
|
||||||
--exclude '/data/programming/obs-v4l2sink/*' \
|
--exclude '/data/programming/void-packages/*' \
|
||||||
--exclude '/data/programming/obs-studio/*' \
|
--exclude '/data/programming/SP-Flash-Tool-src/*' \
|
||||||
\
|
--exclude '/data/programming/obs-v4l2sink/*' \
|
||||||
::'{hostname}-{now}' \
|
--exclude '/data/programming/obs-studio/*' \
|
||||||
/etc \
|
\
|
||||||
/var \
|
::'{hostname}-{now}' \
|
||||||
/home/ninewise/dotfiles \
|
/etc \
|
||||||
/home/ninewise/.gnupg \
|
/var \
|
||||||
/home/ninewise/.password-store \
|
/home/ninewise/dotfiles \
|
||||||
/home/ninewise/.ssh \
|
/home/ninewise/.gnupg \
|
||||||
/home/ninewise/.xmonad/src/ \
|
/home/ninewise/.password-store \
|
||||||
/home/ninewise/.yash_history \
|
/home/ninewise/.ssh \
|
||||||
/data
|
/home/ninewise/.xmonad/src/ \
|
||||||
|
/home/ninewise/.yash_history \
|
||||||
|
/data ;;
|
||||||
|
abysm)
|
||||||
|
borg create \
|
||||||
|
--verbose \
|
||||||
|
--filter AME \
|
||||||
|
--list \
|
||||||
|
--stats \
|
||||||
|
--show-rc \
|
||||||
|
--compression lz4 \
|
||||||
|
--exclude-caches \
|
||||||
|
--exclude '/etc/sv/*/supervise' \
|
||||||
|
--exclude '/etc/sudoers' \
|
||||||
|
--exclude '/etc/securetty' \
|
||||||
|
--exclude '/etc/wpa_supplicant/wpa_supplicant.conf' \
|
||||||
|
--exclude '/etc/sudoers.dist' \
|
||||||
|
--exclude '/etc/kernel.d/post-install/50-grub' \
|
||||||
|
--exclude '/etc/kernel.d/post-remove/50-grub' \
|
||||||
|
--exclude '/etc/gshadow-' \
|
||||||
|
--exclude '/etc/gshadow' \
|
||||||
|
--exclude '/etc/passwd-' \
|
||||||
|
--exclude '/etc/shadow-' \
|
||||||
|
--exclude '/etc/shadow' \
|
||||||
|
--exclude '/var/tmp/*' \
|
||||||
|
--exclude '/var/db/*' \
|
||||||
|
--exclude '/var/cache' \
|
||||||
|
--exclude '/var/lib/alsa' \
|
||||||
|
--exclude '/var/lib/tor' \
|
||||||
|
--exclude '/var/lib/random-seed' \
|
||||||
|
--exclude '/var/log/tallylog' \
|
||||||
|
--exclude '/var/log/btmp' \
|
||||||
|
--exclude '/var/log/dmesg.log' \
|
||||||
|
--exclude '/var/log/faillog' \
|
||||||
|
--exclude '/home/*/.*' \
|
||||||
|
--exclude '/home/*/services/*/supervise' \
|
||||||
|
--exclude '/home/*/dotfiles' \
|
||||||
|
--exclude '*/.git/*' \
|
||||||
|
--exclude '*/.stack-work/*' \
|
||||||
|
--exclude '*/lock' \
|
||||||
|
--exclude '*.lock' \
|
||||||
|
--exclude '*/.mbsyncstate*' \
|
||||||
|
--exclude '*/target/*' \
|
||||||
|
--exclude '*/build/*' \
|
||||||
|
::'{hostname}-{now}' \
|
||||||
|
/etc \
|
||||||
|
/var \
|
||||||
|
/home/noctua/ ;;
|
||||||
|
esac
|
||||||
|
|
||||||
backup_exit=$?
|
backup_exit=$?
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user