From: Matthias M. <mat...@gm...> - 2009-06-25 20:44:43
|
Chris Robertson wrote: > Les Mikesell wrote: >> Matthias Meyer wrote: >> >>> Assumed I have 10 hosts and the maximum number of simultaneous backups >>> to run is 5. >>> Further assumed all 10 hosts have to make a backup today. >>> 4 of them have theire last backup made 2 days ago and 3 of them >>> yesterday. 2 have a partial backup and 1 have no backup. >>> 9 hosts are reachable (ping) the last times but 1 host not. Therefore >>> the BlackoutPeriods for 9 hosts can be applied by backuppc and for 1 >>> host not. Nevertheless the time now is not within this blackout period. >>> >>> Which 5 hosts will request theire backups? >>> >>> Will BackupPC try the hosts in alphabetical order? >>> Or will BackupPC use informations about the oldest backup and try this >>> hosts at first? >>> >> >> The first cut will be which ones have reached their backup interval >> (since the last backup) at each wakeup time. That is, at each wakeup it >> will consider only the set that is not within a blackout and has passed >> the interval time since it's last run - and these will not start if the >> ping test fails. I'm not sure who wins if there are more choices at one >> time than your concurrency limit allows - it might just be the order in >> the host list. I just start one early from the web interface if I want >> to push it ahead. >> > > From the source (/usr/local/BackupPC/bin/BackupPC on my machine)... > > # > # Compare function for host sort. Hosts with errors go first, > # sorted with the oldest errors first. The remaining hosts > # are sorted so that those with the oldest backups go first. > # > sub HostSortCompare > { > # > # Hosts with errors go before hosts without errors > # > return -1 if ( $Status{$a}{error} ne "" && $Status{$b}{error} eq "" ); > > # > # Hosts with no errors go after hosts with errors > # > > return 1 if ( $Status{$a}{error} eq "" && $Status{$b}{error} ne "" ); > > # > # hosts with the older last good backups sort earlier > # > my $r = $Status{$a}{lastGoodBackupTime} <=> > $Status{$b}{lastGoodBackupTime}; > return $r if ( $r ); > > # > # Finally, just sort based on host name > # > return $a cmp $b; > } > > Chris > :-) Thanks for the realy fast response br Matthias -- Don't Panic |