BackupPC-users

Re: [BackupPC-users] changing backup order

2009-01-21 18:02:50
Subject: Re: [BackupPC-users] changing backup order
From: John Rouillard <rouilj-backuppc AT renesys DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Wed, 21 Jan 2009 23:01:09 +0000
On Wed, Jan 21, 2009 at 04:22:02PM -0500, Nick Smith wrote:
> Is there a way to set the order in which backuppc backs up machines?

Well you could schedule via cron and use the
DumpPreUserCmd/DumpPostUserCmd command to set a semaphore file so the
second cron job doesn't trigger the backup of the second host unless
the semaphore is missing.

You could also schedule all the backups serially 8-).

> 
> I need to make sure that 2 certain machines never start backups at the
> same time.

Never start, or don't have their backups overlapping? If machine 1
starts its backup at 2:30, and it runs till 3:30, can machine 2
start its backup at 3:00?
 
> Is this possible?

With some extra shell scripting and the Dump*UserCmd, I think so.

It would be nice if backuppc allowed you to put your hosts into groups
(aka queues) so that you could limit the number of backup jobs running
from any specific queue.

I do almost all of my backups over the WAN, and we are charged for
bandwidth we use over our purchased (commit) level.

Since I run 8 backups in parallel, I use the --bwlimit flag to limit
the speed of the rsync backups to 1/8 of the commit level (minus some
safety margin). So if by some chance one site has all 8 backups
running, it will still fall below the commit. This means that backups
from that site take longer then they should, but at least it doesn't
starve out the other sites that I am backing up. With fewer than 8
slots I have long periods of time where no slots are available and the
backups from the 7 sites weren't completing.

I could increase the number of parallel backups to 10 or 12 if I could
guarantee that there would be no more than 8 from one site. The
group/queue of those machines at the site would have its own
MaxBackups setting and perhaps rsync options. So if I had 12 slots
open, I would be able to saturate the faster links at the site housing
the backup server rather than the slower links at the edge sites.

Hmm, I wonder if setting up a a job like:

   DumpPreUserCmd    semaphore -P site1
   DumpPostUserCmd   semaphore -V site1

where semaphore waits forever to get a lock on one (of 8) site1
semaphores would work?

My guess is that it would stop BackupPC from scheduling any more
backups while the processes were stuck in the DumpPreUserCmd. So maybe
it would be better to use a timeout and have the DumpPreUserCmd exit
with an error preventing the dump and freeing up one of the BackupPC
slots.  Then BackupPC can schedule the backup at a later wakeup cycle.

-- 
                                -- rouilj

John Rouillard
System Administrator
Renesys Corporation
603-244-9084 (cell)
603-643-9300 x 111

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>