Daily backup to external hdd - Suggestion.
Posted: Friday 12 February 2021 11:48
Hello,
I am not quite sure where to direct this topic to; but most likely the moderator knows to whom to send this mail to.
I am using the Taskplanner of Synology DAS to make a daily back-up of the Domoticz.db to a different drive, as per Wiki "Daily backup to external hdd".
It works fine; except for the deleting of files older then x days.
The script in the wiki-article states something like:
## Delete files older then 7 days
/usr/bin/find /volume1/Back-ups/Domoticz-backup/ -name '*.db' -type f -mtime +7 -delete
The term "-mtime" should be replaced with "-atime", since -mtime refers to the date the file was last modified. The backups are normally not modified, but only made. By using -atime, the "made date" is used and the script works fine and files older then 7 days are deleted.
Hope this will help.
Regards,
Leo
I am not quite sure where to direct this topic to; but most likely the moderator knows to whom to send this mail to.
I am using the Taskplanner of Synology DAS to make a daily back-up of the Domoticz.db to a different drive, as per Wiki "Daily backup to external hdd".
It works fine; except for the deleting of files older then x days.
The script in the wiki-article states something like:
## Delete files older then 7 days
/usr/bin/find /volume1/Back-ups/Domoticz-backup/ -name '*.db' -type f -mtime +7 -delete
The term "-mtime" should be replaced with "-atime", since -mtime refers to the date the file was last modified. The backups are normally not modified, but only made. By using -atime, the "made date" is used and the script works fine and files older then 7 days are deleted.
Hope this will help.
Regards,
Leo