Full backup without root instructions

The docs have instructions to run restic as non-root and have the step:
root@a3e580b6369d:/# mkdir ~restic/bin
and other references to ~restic/bin but this seems to be a syntax error. Is best practice to keep the setcap’d binary in a bin folder in the root’s homedir, or the restic user’s home?

~restic it the home directory of the user restic. You might need to restart your shell after creating the user – not sure. You can check the home directory of user restic by running getent passwd restic |cut -d: -f6.

Ah - is the reader meant to interpret ~restic as “path where the restic user’s home is”?
# mkdir -p ~restic/bin here created a directory called ~restic, with bin inside, in root’s homedir.

No, this syntax usually understood by your bash (or other shell).

# useradd -m restic # after creating the user restic with this command
# getent passwd restic |cut -d: -f6 # you can run this command to check the home dir
# ls -d ~restic # this the same as `ls -d /home/restic`

This should also answer your question. The tutorial suggests to put the binary in the restic user’s home

1 Like

I managed to make a typo when creating the user, hence why nothing else worked :slight_smile:
Thanks for your help!

1 Like