[CoLoCo] Best backup solution
Kevin Fries
kfries at cctus.com
Tue Mar 11 13:43:58 GMT 2008
On Sat, 2008-03-08 at 10:50 -0700, Jim Hutchinson wrote:
> So, how does one do good backups in Linux? I don't want some cryptic
> cron job. I want a straightforward tool that copies and archives data
> and allows for easy recovery of either one file or the whole thing.
Write a bash script, make sure its executable, then place it
in /etc/cron.daily. You do not have to mess with Cron directly if you
do not want to.
Example:
I wanted to backup the domain (LDAP) accounts every night in case
somebody added something stupid. I wrote a script to slapcat the
directory into /root/ldap_backups/yyyy-mm-dd-ldap.backup every night. I
then wrote a script to clean out old backups (older than 8 weeks). I
placed the slapcat script in /etc/cron.daily, and the cleanup script
in /etc/cron.monthly.
Replace slapcat with say rsync, and you should be able to get similar
results.
The default behavior on most linux system is to run the cron.xxx folders
in the 4am time period. My Ubuntu desktop at work has it set as such:
17 minutes after the hour run everything in cron.hourly
6:25am run everything in cron.daily
6:47am on Sunday run everything in cron.weekly
6:52am on the 1st of the month, run everything in cron.monthly
Hope this helps
--
Kevin Fries
Senior Linux Engineer
Computer and Communications Technology, Inc
A Division of Japan Communications Inc.
More information about the Ubuntu-us-co
mailing list