rsbackup 8.0 | pre-volume-hook / post-volume-hook is executed even if there is no backup necessary

Samuel Wolf samuelwolf85 at googlemail.com
Tue Aug 29 10:41:54 BST 2023


Hello Richard,

> Assuming your cronjob uses --prune and not --backup, they should not be
> executed.

[...]

> It's possible to configure the same script as both a volume hook and
> device hook; the idea is that the script uses $RSBACKUP_HOOK to
> distinguish which hook is running. Of course if it gets this wrong then
> in this configuration it could look like a volume hook was running when
> really the device hook was running.

I configure the script per host in the volume:

host srv01
  volume SQL_BACKUP /mnt/srv01/SQL_BACKUP
        pre-volume-hook /etc/rsbackup/scripts/pre-srv01.sh

This should only be execute on backup, right?

But for some reason it execute *once* again in the morning and then
only in the next night for backup (as expected).
This is why I think the --prune job start it.

Debian 12.1
rsbackup  8.0-1

/etc/crontab
4 0 * * * root rsbackup --backup

/etc/rsbackup/defaults
backup=daily
prune=daily

[...]
2023-08-29T00:04:01.414129+02:00 backup CRON[308753]: (root) CMD
(rsbackup --backup)
2023-08-29T00:17:01.413660+02:00 backup CRON[309014]: (root) CMD (cd /
&& run-parts --report /etc/cron.hourly)
[...]
2023-08-29T02:45:24.089952+02:00 backup kernel: [1415503.454925] CIFS:
Attempting to mount \\srv01\SQL_BACKUP

--> backup for srv01 start as expected at 2:45 am

[...]
2023-08-29T06:25:01.800072+02:00 backup CRON[314345]: (root) CMD (test
-x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.daily;
})
2023-08-29T06:25:02.845929+02:00 backup kernel: [1428682.087185] CIFS:
Attempting to mount \\srv01\SQL_BACKUP

--> daily cronjob and here is my pre/post-volume-hook again, but why?

host srv01
  volume SQL_BACKUP /mnt/srv01/SQL_BACKUP
        pre-volume-hook /etc/rsbackup/scripts/pre-srv01.sh

This works fine with Debian 11 and rsbackup 6.0.
Have you any idea what's wrong?

Samuel



More information about the sgo-software-discuss mailing list