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

Richard Kettlewell rjk at terraraq.uk
Sun Aug 27 16:20:43 BST 2023


On 23/08/2023 12:41, Samuel Wolf wrote:
> Hello Richard,
> 
>> This doesn't seem like great behavior, indeed. It should be fixed in the
>> next release.
> 
> thanks, that would be great.
> 
> Is it possible that pre- and post-volume-hook also executed if the
> prune cron run?

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

This is checked at build time by a test at 
https://github.com/ewxrjk/rsbackup/blob/8.0/tests/prune#L67 - the 
'absent' commands verify that the test hook didn't leave a stamp file.

It's a little clearer in more recent versions 
(https://github.com/ewxrjk/rsbackup/blob/master/tests/prune#L67) but the 
logic is the same.

The device hooks, on the other hand, will be run.

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.

> Normally my backup run in the night and there some things in the
> volume-hooks who restart services.
> The complete backup is finish at 5 am but I see the *-volume-hook
> runing again between 6 am and 8 am...

ttfn/rjk




More information about the sgo-software-discuss mailing list