dotfiles/bin/backmeup

14 lines
549 B
Plaintext
Raw Normal View History

2020-10-27 21:06:46 +01:00
#!/bin/sh
datum=$(date +"%y-%m-%d")
2020-11-11 00:16:56 +01:00
backuplog=/root/backup-log
2020-10-27 21:06:46 +01:00
2020-11-11 00:16:56 +01:00
#sudo sshfs pi@192.168.64.112:/home/pi/mast/bak/tp /root/.bak
#borg create -svp pi@192.168.64.112:~/mast/bak/tp::$datum /etc /home /opt /root /srv /var | sudo tee -a $backuplog
2020-11-11 00:16:56 +01:00
echo "Backup sistema $datum" | sudo tee -a $backuplog
rsync -avz /etc /home /opt /root /srv /var pi@192.168.64.112:~/mast/bak/tp | tee -a $backuplog
2020-11-11 00:16:56 +01:00
#sudo borg create --stats --verbose --compression=lz4 "/root/.bak::$datum" /etc /home /opt /root /srv /var | sudo tee -a $backuplog
#sudo umount /root/.bak