dotfiles/.bin/daily.sh
Franziska Kunsmann b06d9d0332
.bin/daily.sh: reorganize, use rsync instead of borgbackup
We can get away with using rsync, because we're using encrypted zfs on
the other side. No need to do encryption on the source side, nor is there
need to manage backup retention using borg. zfs snapshots are good enough.
2020-11-26 08:02:48 +01:00

30 lines
815 B
Bash
Executable file

#!/bin/sh
set -euo pipefail
set -x
# Push some git repos
pass git push
git --git-dir=$HOME/.cfg/ --work-tree=$HOME push
# Do a backup.
rsync -zaAP --numeric-ids --delete --relative \
--rsync-path="/usr/bin/rsync --fake-super" \
-e "ssh" --delete-excluded \
--exclude "/home/kunsi/.cache/" \
--exclude "/home/kunsi/.config/Rambox/" \
--exclude "/home/kunsi/.npm/" \
--exclude "/home/kunsi/.nvm/" \
--exclude "/home/kunsi/.platformio/" \
--exclude "/home/kunsi/Downloads/" \
--exclude "/home/kunsi/Schreibtisch/" \
--exclude "/home/kunsi/VirtualBox VMs/" \
"/home/kunsi" "kunsi-t470@nas":backups/
rsync -zaAP --numeric-ids --delete --relative \
--rsync-path="/usr/bin/rsync --fake-super" \
-e "ssh" \
"/etc" "kunsi-t470@nas":backups/
# Do updates
yay -Syu