How to mount/unmount target location AND user the forget:prune option for a location? #442
Unanswered
hunorbatori
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks,
On my servers I back up data to a mounted nfs share (backend
type: local). This share is mounted all the time (set in fstab). However I would like to have the share mounted only during backup.To do this I removed the fstab entry for the share and added the mount command to the
prevalidatehook in the configuration and the unmount command to theafterhook. The problem is that I also have theforget: pruneoption for my location which I like there, but seemingly the forget command runs after theafterhook, meaning by the time autorestic wants to forget old snapshots the share is unmounted and the command fails.Is there a way to keep the mount/unmount in the hooks and use the
forget: pruneoption in the location as well or I have to create a script which mounts, forgets, unmounts and put that into crontab or something?Beta Was this translation helpful? Give feedback.
All reactions