[Box Backup] Backing up the backup store with rsync, write.lock files

Ben Summers boxbackup@fluffy.co.uk
Tue, 29 Aug 2006 09:34:30 +0100


On 26 Aug 2006, at 06:19, E.W. Peter Jalajas wrote:

> Hi all,
>
> I'm starting to build a geographically remote machine to which to  
> rsync
> my primary box backup store.  My intent is to design that remote  
> server
> so that "The server is trusted only to make files available when they
> are required", to cop a phrase.
>
> I've setup rsync with ssh keys (inspired by Troy Johnson at
> http://www.jdmz.net/ssh/  "Using Rsync and SSH") to automatically push
> from the store server to the remote server every few hours.  I set  
> this
> up to run as a user to be used only for this purpose, username  
> "rsync1"
> on both machines.  The command that I'll run on the server store
> machine will be something like:
>
> rsync -azvu --delete --stats -e "ssh -p 8023 -i $KEY"
> /home/rsync1/rsyncbu rsync1@mainstore:/backupstore
>
> where $KEY is the path/filename of the private key.
>
> I'm comfortable that I can get all my store files backed up this way,
> except for all of the write.lock files because they have 600
> permissions with user _bbstored (see a related thread here:
> http://lists.warhead.org.uk/pipermail/boxbackup/2006-May/002550.html )
>
> I don't care if I'm missing the write.lock files for this purpose, do
> I?

You do not need to copy the write.lock file. It's only used as  
something to gain a flock() on to ensure only one process is writing  
to the store at any one time. It is created if it's not present.

Remember to do a bbstoreaccounts check fix on the rsynced store  
before using it.


>
> P.S. I'm on the US East Coast, and I have a buddy in Oregon on the  
> West
> Coast, several thousand miles away, who is willing to plug an rsync
> server box like the one described above into his network for me so  
> that
> I can get real geographically distant redundancy.  But I wonder if
> maybe I should instead find another Box Backup devotee on the Left
> Coast to trade rsync boxes with... ;^)

There is some interest in writing the code to do proper backup  
bbstored servers. This would involve keeping a list of dirty objects  
during a write session, then copying them over when done, and  
similarly for housekeeping. This is obviously a better way than rysnc.

Ben