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
-
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
prevalidate
hook in the configuration and the unmount command to theafter
hook. The problem is that I also have theforget: prune
option for my location which I like there, but seemingly the forget command runs after theafter
hook, 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: prune
option 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