update backup script

This commit is contained in:
KoenDR06 2025-05-29 14:03:03 +02:00
parent 07e7187d4b
commit 09e213195d
2 changed files with 6 additions and 9 deletions

View file

@ -1,14 +1,11 @@
#!/run/current-system/sw/bin/zsh #!/run/current-system/sw/bin/zsh
# Documents
cd /home/horseman cd /home/horseman
file=backups/$(date +%Y-%m-%d).tar tar -cf backups/documents.tar Documents
tar -cf $file Documents
if grep -q $(sha256sum $file) backups/sum; then # Vaultwarden
echo 'hashes match, quitting' cd /home/horseman
rm $file tar -cf backups/vaultwarden.tar docker/vaulwarden/data
exit 0
fi
echo $(sha256sum $file) > backups/sum
exit 0 exit 0

View file

@ -20,7 +20,7 @@ in {
systemd.timers."backupSyncthing" = { systemd.timers."backupSyncthing" = {
wantedBy = ["timers.target"]; wantedBy = ["timers.target"];
timerConfig = { timerConfig = {
OnCalendar = "weekly"; OnCalendar = "daily";
Persistent = true; Persistent = true;
}; };
}; };