[NCLUG] Server-to-Server backups

Grant Johnson grant at amadensor.com
Mon Jun 26 21:40:14 MDT 2006


Stephen Warren wrote:
> DJ Eshelman wrote:
>   
>> Hey all...
>>
>> Ideally we'd like to configure the servers to just simply backup their hard
>> drives to the other server's second drive - we figure that would be a good
>> level of redundant ability.  This is all easy enough, I suppose, but
>> there's
>> one little catch:  We're limited in bandwidth to about 2000GB per month.
>> Now, I know what you're saying - what is the big deal?  That's a lot of
>> bandwidth!  But aside from the bandwidth we'd also not like this process to
>> consume a horribly long amount of time.
>>     
>
> I usually stage a backup image to local disk (e.g. "copy" local files
> using rsync, use various products' custom backup/export/snapshot scripts
> etc.), and then use an application called rsync to "copy" it to other
> server(s).
>
> rsync will do incremental copy-only-what-changed style backups (not only
> copying just files that changed, but also copying just the blocks within
> those files that changed)
>
> It's also pretty easy to store N recent hard-linked copies for backup
> history too - either via pre-written solutions like
> http://www.math.ualberta.ca/imaging/rlbackup/ (google rsync backup link
> or something like that), or custom scripts.
>   
I do something very similar with a custom script.  I am backing up to a 
second local drive, but across the wire would be the same because rsync 
is network transparent.

I have also worked my database and SVN backups into this.   This is run 
every minute from cron.   It checks the pid file, and if it is more than 
24 hours old, it runs.   I can also do an on-demand backup by simply 
deleting the pid file.

Not as cools as the other package, but easy to read what I slapped 
together in under an hour.  You might also note the mounting and 
unmounting of the drive.   It makes it read only except when the backups 
are happening.   One little bug here:   If one of the files is being 
accessed, the file system stays read write with the same original 
protections as it had in the home dirtectories.  Not a big deal for me, 
but you may want to do an lsof and cut it down then pipe it off to kill 
before you unmount the file system, then check to see that it unmounted.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bkup.exclude
URL: <http://lists.nclug.org/pipermail/nclug/attachments/20060626/32e5ebee/attachment.ksh>


More information about the NCLUG mailing list