I aplogize if this has been discussed before - I tried my best to research questions here before posting.
I’ve been backing up several systems with Restic with great success.
Recently, a task has come up which requires me to periodically extract files with a specific extension from those (Windows) systems, and I would like to extract them from the Restic snapshots - as they are up to date and I can find the files I need easily from a Linux machine instead of the Windows clients.
However, when I try to mount in the background (both from my terminal and a script), one of the following happens:
- the terminal hangs until I disable the process from another terminal
- the mount exits and nothing happens
- the system logs me out of my ssh session
I’ve been trying the following commands:
restic -r sftp://[path-to-mount] mount [path-to-mountpoint] &
Following another thread here, I also tried the following:
nohup restic -r sftp://[path-to-mount] mount [path-to-mountpoint] > restic-mount.log 2>&1 &
And various variations of those two commands.
I’m not sure what I’m doing wrong and would greatly appreciate help - is it possible to mount, extract files, and umount a restic snapshot from a bash script?