-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to specify cwd #23
Comments
Agreed, that might be handy to have. I'm thinking of introducing it as something like |
I have pushed a few changes to |
Will do, thanks for your quick reaction! |
Hey, finally had a chance to test on my setup, sorry for the delay. |
Great to hear! You mean a file [home]
_cwd: ~ implies [home]
_cwd: ~
_args: . ? Hmm... I think woud prefer to not implement any default behaviour here, as using a cwd and then defining a path relative to it is definitely advanced usage that requires knowledge about how |
Okay, i agree, i'm just looking for an option to have a "speaking" config file, as the idea of the option "_args: /path/to/backup" is not immediately clear for everyone. However, that has nothing to do with this request. I'll open a new ticket, this one is solved perfectly! |
Lets keep this open until it has been merged into |
Actually, I am playing with the idea of moving |
Ok, I think I like it more that way: Your typical UNIX environment variables already contain [home]
_args: .
[home.environ]
PWD: ~ And you can also now cleanly override this value from the commandline env PWD=~ crestic home backup A small caveat: Normally, changing (cd / && ls)
env PWD=/ ls but I am ignoring that fact here. |
While it technically is, i think it makes the config harder to read, which should also not be neglected. The current solution looks good to me - maybe you could show how the idiom i mentioned would look in with the alternative approach? |
This is now in 0.8.0 and called |
I'd like to propose a new feature - the ability to specify the cwd of the backup process. This seems to be a recurring pattern to allow relative path based backups (a use case is described at https://forum.restic.net/t/backing-up-restoring-relative-paths/744). This would be quite easy, as the
subprocess.call
supports the cwd parameter.The text was updated successfully, but these errors were encountered: