Hi there,
On Tue, 22 Jul 2025, Matthew Pounsett wrote:
On Fri, Jul 18, 2025 at 2:59?PM G.W. Haywood wrote:
Are you saying that during the period in which you allow backups there
should be enough time to perform a backup for every client, but that a
client wasn't getting backed up despite that?
Yes.
...
...
Since February 2020 I have had MaxBackups set at 1, and the blackout
period for all the clients set at Monday-Saturday from 07:30 to 23:30.
No, that's not identical. If all of your hosts have the same blackout
period, then none of them can stomp on the blackout periods of other
hosts.
Sorry, I somehow lost sight of the fact that the problem host had a
shorter blackout than the others.
Even though the problem has been resolved there are two reasons for
writing now.
The first is that investigation can be started relatively painlessly.
If you look around line 1760 in .../bin/BackupPC you should find sub
HostSortCompare. Here are the comments at its head:
8<----------------------------------------------------------------------
# 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.
8<----------------------------------------------------------------------
If things aren't working this way then maybe something needs fixing.
When hosts are added to the queue, sub HostSortCompare is called by
sub QueueAllPCs (which is at around line 1875).
In sub QueueAllPCs there's this bit of code
8<----------------------------------------------------------------------
foreach my $host ( sort HostSortCompare keys(%$Hosts) ) {
$nSkip++ if ( QueueOnePC($host, $host, 'BackupPC', 'bg', 'auto') == 2 );
}
foreach my $dhcp ( @{$Conf{DHCPAddressRanges}} ) {
for ( my $i = $dhcp->{first} ; $i <= $dhcp->{last} ; $i++ ) {
my $ipAddr = "$dhcp->{ipAddrBase}.$i";
$nSkip++ if ( QueueOnePC($ipAddr, $ipAddr, 'BackupPC', 'bg',
'dhcpPoll') == 2 );
}
}
8<----------------------------------------------------------------------
I don't have time to investigate this now. If you want to dig further
then I suggest that when you next set MaxBackups to '1', immediately
before the first occurrence of the "$nSkip++ if ( ..." you could add a
log line such as
print(LOG $bpc->timeStamp, "Attempting to queue host $host\n");
and immedaitely begore the second occurrence a line something like
print(LOG $bpc->timeStamp, "Attempting to queue IP $ipAddr\n");
You could obviously extend this to do more complex logging with a bit
of Perl tinkering.
If you don't have the time either, then maybe raise an issue on Github
(WHAT AM I SAYING????) and put a link to this thread in there.
The second and I think more important reason for writing now is
On Wed, 23 Jul 2025, Adam Goryachev wrote:
...
4) Enable monitoring so that hosts with backups that are too old are
notified so that you can resolve the issue, instead of finding out later
after some potential failure
...
+1
In my config.pl I've changed $Conf{EMailNotifyOldBackupDays} from the
default of 7 days to 1.2. I'm thinking about increasing it to 1.5. :)
This notification system does work. I have several hosts which don't
get switched on very often and I get almost daily emails about them.
But it sounds like this notification didn't happen for Mr. Pounsett
even though the host was not backed up for two weeks, is that right?
If so, this needs attention.
--
73,
Ged.
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/