hi,<br><br>I have a cron job that does a daily backup of my DB.&nbsp; I dont want these backups to build up so i want to delete the old ones.&nbsp; I would like to keep a back log of 3 days.&nbsp; I wrote this script and it used to work but its not anymore.
<br><br>------------------------------------------------------------------------------------------------------------------<br>FN=mythtv_backup-$(date +%Y-%m-%d_%H:%M).sql<br>DIR=/mythbackups<br><br>mysqldump -u mythtv -pmythtv mythconverg -c &gt; $DIR/$FN
<br><br># bzip our db backup so it takes alot less space<br>bzip2 $DIR/$FN<br><br>#delete any backup files that status haven&#39;t changed for over 3 days.<br>rm $(find $DIR -ctime +3 -name &quot;mythtv_backup*&quot;)<br>
<br>#copy the backups to my frontend just in case a HDD crash<br>scp /mythbackups/* myth@192.168.0.203:/mythbackups<br>------------------------------------------------------------------------------------------------------------------
<br><br>For some reason my find isnt working anymore....<br><br>------------------------------------------------------------------------------------------------------------------<br>[myth@mythtv mythbackups]$ find /mythbackups -ctime +3 -name &quot;mythtv_backup*&quot; 
<br>[myth@mythtv mythbackups]$ ls -l<br>total 22992<br>-rw-r--r-- 1 root root 2972304 Oct 22 04:47 mythtv_backup-2007-10-22_04:47.sql.bz2<br>-rw-r--r-- 1 root root 3114204 Oct 23 04:47 mythtv_backup-2007-10-23_04:47.sql.bz2
<br>-rw-r--r-- 1 root root 3384627 Oct 24 04:49 mythtv_backup-2007-10-24_04:48.sql.bz2<br>-rw-r--r-- 1 root root 3533711 Oct 25 04:47 mythtv_backup-2007-10-25_04:47.sql.bz2<br>-rw-r--r-- 1 root root 3496667 Oct 26 04:47 mythtv_backup-2007-10-26_04:
47.sql.bz2<br>-rw-rw-r-- 1 myth myth 3500124 Oct 26 15:20 mythtv_backup-2007-10-26_15:20.sql.bz2<br>-rw-rw-r-- 1 myth myth 3500095 Oct 26 15:22 mythtv_backup-2007-10-26_15:22.sql.bz2<br>------------------------------------------------------------------------------------------------------------------
<br><br><br>Any ideas what the issue is?<br><br>Thanks,<br>Mitchell<br>