Author: pgib
Date: 27-10-09 01:58
Great article and interesting approach! I may adopt the use of newsyslog for some of our stuff, too! We use a simple script I made to dump our databases out to a path. The script can be found here: http://gist.github.com/219233
The script can run via a cron job at your desired frequency. To prune old backups, we have another cron job that uses the find command:
0 2 * * * /usr/bin/find /path/to/backups -type f -mtime +30d -delete
If you wanted to be more specific about the names of the files being deleted, you could do:
0 2 * * * /usr/bin/find /path/to/backups -type f -mtime +30d -name 'mybackup*' -delete
|
|