I just found your post. That's great and THX.
So, you finally wrote the script for the whole database backup following our discussion in june http://forum.qnap.com/viewtopic.php?f=32&t=15310
I have the solution working daily since then without any trouble.
I also use a rolling list to keep only the latest archives.
May be a future feature
- Create a folder with the date
- keep the X latest archives
Code: Select all
CMD_AWK="/bin/awk"
CMD_RM="/bin/rm"
SQL_BKP_NB=15 # Keep the latest 2 weeks archives
$CMD_RM -fR `ls -t /share/Qbackup/mysql/*| $CMD_AWK 'NR>'$SQL_BKP_NB`