[Box Backup] Continuous backup only when idle

Yang Zhang yanghatespam at gmail.com
Wed May 18 07:35:46 BST 2011


I think that requires su to run, otherwise I get:

** Message: Failed to connect to the D-BUS daemon: Failed to connect
to socket /tmp/dbus-3xuFKEU3cy: Connection refused

Instead I'm checking the tty's for idle times, which encompasses ssh
sessions but doesn't cover X-only activity:

w | perl -ane '
  BEGIN { $x = 1 };
  next if $. <= 2;
  $x &= $F[4] =~ /(m|days)$/;
  END { print $x ? "now\n" : "3600\n"; }
'


On Fri, May 6, 2011 at 1:48 PM, Chris Wilson <chris at qwirx.com> wrote:
> Hi Yang,
>
> On Fri, 6 May 2011, Yang Zhang wrote:
>
>>>> Yes, I have had the same problem.  It appears to me that Box Backup
>>>> fills my meager outbound DSL bandwidth, which apparently interferes
>>>> with my inbound bandwidth, making our systems run slow.
>>>
>>> Yang Zhang, is it your Internet connection that is slowing down, or the
>>> host
>>> running bbackupd?
>>
>> It's the host load, though I can imagine that being a problem as well
>> for those on slower upstream connections (as in Peter's case).
>
> In that case, please do consider setting MaxUploadRate as well or instead.
>
>>> 2. Reducing MaximumDiffingTime to reduce the amount of time that bbackupd
>>> spends performing heavy disk I/O;
>>
>> Does this mean that boxbackup won't be able to diff/backup large files
>> (even when I'm not using my computer)?
>
> Yes, it would mean that.
>
>>> 3. Using a SyncAllowScript to prevent backups from starting during your
>>> peak hours.
>>
>> This sounds promising - any ideas on how to whip up a script that detects
>> whether I'm actively using my computer (either via X or ssh)?
>
> If you use gnome-screensaver, here's a quick SyncAllowScript:
>
> #!/bin/sh
> if gnome-screensaver-command -q | grep -q 'The screensaver is active'; then
>        echo "now"
> else
>        echo 3600
> fi
>
> Cheers, Chris.
> --
> _____ __     _
> \  __/ / ,__(_)_  | Chris Wilson <chris+sig at qwirx.com> Cambs UK |
> / (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
> \__/_/_/_//_/___/ | We are GNU : free your mind & your software |
> _______________________________________________
> Boxbackup mailing list
> Boxbackup at boxbackup.org
> http://lists.boxbackup.org/cgi-bin/mailman/listinfo/boxbackup
>
>



-- 
Yang Zhang
http://yz.mit.edu/



More information about the Boxbackup mailing list