On 23/7/2025 00:35, Matthew Pounsett wrote:
On Fri, Jul 18, 2025 at 5:51 PM Christian Völker via BackupPC-users
<backuppc-users@lists.sourceforge.net> wrote:
As far as I can say (and I see it here in my v4 setup) is: there
is an
order in the host list to be backed up. If a scheduled time occurs,
BackupPC takes the host for the next backup where the last backup
date
is the oldest. Of course, if checks then for some blackout
periods. So
it might skip this host. But then it'll grab the next from the
ordered
list of "last backup".
This is not what I saw. I let the problem host get up to 8 days
without a backup before I realized we had a problem and I had to start
manually queueing a backup every couple days. Backuppc appeared to be
grabbing whatever was at the top of the queue, not whatever had the
least-recent last backup.
Now that I'm no longer on MaxBackups=1, most backups are
completed early in the day so by the time I get to my desk the Current
Queue is mostly empty, and harder to observe what its behaviour is.
I think you can validate the behavior easily by viewing the queue page.
At each wakeup time, all hosts are added to the queue, seemingly in
alphabetical order.
If there is a spare "backup slot" ie, MaxBackups is > currently in
progress, then a host is taken from the top of the queue, and evaluated
whether a backup should start or not (blackout period, last backup time,
etc)
Repeat the above, until backups in progress == MaxBackups, then pause
and do not continue to process the queue until a backup completes
So, if your host is sorted later in the list, and you are unable to
complete all backups during the backup window, then the host will indeed
never be backed up.
There is a valid reason to sort the queue for "oldest" backup, however,
this may simply break someone else's workflow, for example, schedule the
important host to have a backup every hour, and some other host to
backup once a week, so the "oldest" is the once a week, even though it
isn't really due.
Admittedly, it would get skipped pretty quickly, since there is no
backup due.
However, probably the better sort would be based on when the next backup
is due, but I expect the "overhead" of performing this analysis is not
worth the effort for implementation.
Possibly, hosts could be added to the queue based on when next backup is
due, (ie, instead of being evaluated each time a host needs to be
retrieved from the queue, it is evaluated once when adding the hosts to
the queue), but again... probably not worth it.
In your case, the suggestions would be:
1) Make sure all backups can be completed within the backup window allowed.
2) Consider adding more wake up times, including at or close to midnight
3) Consider adding blackout windows to your other hosts to allow this
one to complete at the 1am window first, and other hosts can only start
at the next window after 1am.
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
Either way, sounds like you have it resolved now, but always helpful to
understand more about how BPC is working.
_______________________________________________
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/