You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: if you have a question or want discussion please post in the discussions area.
Is your feature request related to a problem? Please describe.
Parent folders change impact snapshot
Note that when using absolute paths to specify the backup source, then also changes to the parent folders result in a changed snapshot. For example, a backup of /home/user/work will create a new snapshot if the metadata of either /, /home or /home/user change. To avoid this problem run restic from the corresponding folder and use relative paths.
My initial thought is that this probably isn't something that makes sense for a built in capability for backrest, but is something that can be customized today by setting the working directory that you run backrest from.
Backrest doesn't do anything to change restic's working dir when forking it so it will be inherited.
@garethgeorge I am using backrest on my NAS. Now all backup dirs maps to /backup. Do you means separate them to different folders? But in this way, if I have 10 folders, I need map them in docker volume one by one.
Not sure I follow -- at a high level that sounds potentially fragile. I think I'm more so pointing out that I don't see a general purpose solution where backrest changes the working directory.
E.g. cd some_dir && restic -r /srv/restic-repo backup . --skip-if-unchanged works well if you want to backup a single directory and it's the current working directory, but backrest supports lists of paths e.g. potentially many disjoint folders.
In terms of work arounds, you can change the workdir that backrest runs from and try to use relative paths -- but I don't have any strong recommendations for how you should setup your folders in that case beyond doing something that makes the most sense to you :)
Note: if you have a question or want discussion please post in the discussions area.
Is your feature request related to a problem? Please describe.
Parent folders change impact snapshot
Note that when using absolute paths to specify the backup source, then also changes to the parent folders result in a changed snapshot. For example, a backup of /home/user/work will create a new snapshot if the metadata of either /, /home or /home/user change. To avoid this problem run restic from the corresponding folder and use relative paths.
https://restic.readthedocs.io/en/latest/040_backup.html#comparing-snapshots
Describe the solution you'd like
Run backup cli into the exact folder.
cd /home/user/work && restic -r /srv/restic-repo backup . --skip-if-unchanged
The text was updated successfully, but these errors were encountered: