[Box Backup] Stupid geo-redundancy tricks
E.W. Peter Jalajas
boxbackup@fluffy.co.uk
Thu, 6 Sep 2007 19:54:12 -0700 (PDT)
Hi all,
I've been implementing geo-redundancy by rsync-ing my store server out to another server nightly.
But, that is starting to kill my outbound bandwidth. I'm looking now to push that feature down to
the clients in a reasonable way, having them upload to 2 different servers. I know there is lots
of talk about this on the list, but I don't anybody has anything working as of now.
My clients are essentially all on Windows.
This is ALL totally unsupported.
A design requirement is that the 2 backups run concurrently (we can't do that though because the
pipe only supports one daemon, I think--could a pipe be named and made configurable?) or
sequentially one after the other after each full sync run completes (sync to one server ASAP so
that you have at least one good full backup, then start syncing to the other server as a sort of
re-backup).
I got it working with 2 .conf files and 2 Scheduled Tasks, but that isn't stable cuz the backup
processes could step on each other (I have no idea how long any sync run will last--Maybe I could
do it with the 2nd Scheduled Task first checking if a sync is in progress somehow.) It was also
fairly clumsy, so I'd like to avoid that if I can.
A trick I tried, is to use SyncAllowScript to run a little batch file that silently (lots of >
nul's) swaps out .conf files (with store-server-specific StoreHostname, StoreObjectInfoFile,
Server:PidFile, and DataDirectory in each .conf file) and runs bbackupctl reload and also prints
"now". After flailing around with it for a while, I came up with this line to put at the end of
the SyncAllowScript.bat which almost works:
echo now && "e:\Program Files\Box Backup\bbackupctl" -c "e:\Program Files\Box
Backup\bbackupd.conf" wait-for-end && "e:\Program Files\Box Backup\bbackupctl" -c "e:\Program
Files\Box Backup\bbackupd.conf" reload
If I put a reload command before the "echo now", then it would never sync. If I put it after, I
forget, but it didn't work. The line above almost works, reports that it is reloading, but it
never really sees the new .conf. (I must say that I think sometimes it would reload, but only
after some backedup files changed, I think. It was kind of rare and random.)
I tried a hundred other ways, but just can't seem to get SyncAllowScript to reload and sync (in
either order).
Any suggestions? ("Go away" is an appropriate response.)
Thanks
Pete