I want to backup the files of my user and also the files of root. So I set it up to run restic twice, one from the user and one with sudo. However, now the sudo aborts, because rclone is only authorized for the user. I fear I must copy the rclone config to root as well. So, my questions are:
- Is there a way to cleanly separate user and authorization, without copying rclone authorization for every user?
- If I backup everything with root (using a root version rclone config), will the files come out with the right authorization if I restore?
Hopefully you guys have some experience with these issues.
You can pass rclone
config location as rclone
flag --config
. Check restic
docs how to pass rclone
flags or use env variables (RCLONE_CONFIG).
Depending on remotes used you might have to make sure that this file is writeable for all users using it as rclone
maintains refreshed access tokens in the same file.
They should but I would always test it to be sure if your setup does what you want. It is good idea to test restore anyway - at least this is what I always do:) as theory sometimes is different than practice.
Thank you for your reply. So it sounds like I can choose to either use a separate config per user or use one of the users’ config, but with enough authorization for others.
As sharing authorization between users has always been hard for me, I think I will have root with it’s own config.
Thank you very much for your input. I was not aware of this option.