The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 How we do it
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

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org