update backup script
This commit is contained in:
parent
07e7187d4b
commit
09e213195d
2 changed files with 6 additions and 9 deletions
|
|
@ -1,14 +1,11 @@
|
|||
#!/run/current-system/sw/bin/zsh
|
||||
|
||||
# Documents
|
||||
cd /home/horseman
|
||||
file=backups/$(date +%Y-%m-%d).tar
|
||||
tar -cf $file Documents
|
||||
tar -cf backups/documents.tar Documents
|
||||
|
||||
if grep -q $(sha256sum $file) backups/sum; then
|
||||
echo 'hashes match, quitting'
|
||||
rm $file
|
||||
exit 0
|
||||
fi
|
||||
echo $(sha256sum $file) > backups/sum
|
||||
# Vaultwarden
|
||||
cd /home/horseman
|
||||
tar -cf backups/vaultwarden.tar docker/vaulwarden/data
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ in {
|
|||
systemd.timers."backupSyncthing" = {
|
||||
wantedBy = ["timers.target"];
|
||||
timerConfig = {
|
||||
OnCalendar = "weekly";
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue