[Box Backup] temporarily stop sync

Ben Summers boxbackup@fluffy.co.uk
Wed, 12 Oct 2005 11:30:40 +0100


On 12 Oct 2005, at 11:16, Eelco Leenen wrote:

> Hello,
>
> The initial backup from the server of our clients can be quite  
> large (> 20
> Gb). Since the upstream capacity is limited, we don't want to  
> consume the
> bandwidth during normal business hours. What's the best way to  
> achieve a
> temporarily stop of the sync ? (let's say from 7:30 am till 0:00 am)
>
> I can see an option in the configuration file 'SyncAllowScript'  
> which should
> be able to cover the above. But, since no examples are provided, I  
> don't
> have any idea how.

There should be some notes in the .conf file. But your script just  
outputs, on a line with a terminating newline, either a number of  
seconds to delay the sync, or 'now' to let the sync go ahead.

However, it won't stop a sync in progress, so you can't use it.

>
> An option could be to kill the daemon and then later restart it again
> followed by a sync command. But, imo, this solution is quite nasty.

It's your only option, I think. And will work fine, it's written to  
cope with unexpected things happening. However, it will need to  
download the directory listing from the server when it restarts,  
which will take a little while.

Try it and see.

But... personally what I would do is use your platform's packet  
filter to throttle the bandwidth used during working hours. It's  
trivial using pf under OpenBSD, and I'm sure other platforms must  
have done something similar by now.

Ben