Moved backups to unique directory. Updated log deletion.
This commit is contained in:
parent
7bcec44bb8
commit
c017b28547
1 changed files with 2 additions and 2 deletions
|
|
@ -4,7 +4,7 @@
|
|||
#http://www.bobulous.org.uk/misc/rsync-backup.html
|
||||
date=`date +%Y-%m-%d`
|
||||
mount_point='/media/tracey/Backup'
|
||||
log_file='/home/tracey/usb-rsync-backup-'${date}'.txt'
|
||||
log_file='/home/tracey/backuplogs/usb-rsync-backup-'${date}'.txt'
|
||||
|
||||
echo "#####"
|
||||
echo ""
|
||||
|
|
@ -35,4 +35,4 @@ echo "Log of this backup is in $log_file"
|
|||
echo "Now deleting backup logs over 7 days"
|
||||
echo "####"
|
||||
|
||||
find /home/tracey -iname 'usb-rsync-backup-*' -mtime +7 -exec rm {} \;
|
||||
find /home/tracey/backuplogs -iname 'usb-rsync-backup-*' -mtime +7 -type f -delete
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue