Updated backup script.

This commit is contained in:
2021-01-08 00:45:33 +00:00
parent ec152c590e
commit 6854f0f16b
3 changed files with 20 additions and 6 deletions

View File

@@ -0,0 +1,12 @@
#!/bin/bash
DATE=/bin/date
SYNC="/usr/bin/rsync -auAX --delete"
TIMESTAMP=`$DATE +%Y%m%d-%H:%M%z`
LOG=/mnt/hdd/backup/backup.mybook.vahagn.$TIMESTAMP.log
echo Starting $LOG | tee -a $LOG
echo start `$DATE` | tee -a $LOG
$SYNC /mnt/mybook/vahagn /mnt/hdd/backup | tee -a $LOG
echo end `$DATE` | tee -a $LOG