resticprofile icon indicating copy to clipboard operation
resticprofile copied to clipboard

Interactive mode for mount / restore / stats / snapshots

Open ryszard-suchocki opened this issue 2 years ago • 2 comments

Hello, I want to request enhancement that regards interactive mode for resticprofile when mount/restore/stats/snapshots are invoked. My motivation is quite simple - I have 2 repositories in my profile and I would like to choose whether I want to connect to the "main repo" or "copy repo". Currently, this requires manual file modification before any action. Would it be possible to read how many repository entries exist and if the profile has more than 1, display a list to choose which one should be used for mount/restore/stats/snapshots (commands without scheduler)?

Best regards

ryszard-suchocki avatar Jul 25 '22 06:07 ryszard-suchocki

Not sure if I get it correctly but shouldn't the following work:

profile:
  repository: /main/repo
  ... all further config ...

profile-of-copy:
  inherit: profile
  repository: /copy/repo
resticprofile profile.mount /mnt/main-repo
resticprofile profile-of-copy.mount /mnt/copy-repo

jkellerer avatar Jul 25 '22 18:07 jkellerer

Hello, it seems fine, but it requires copying/rewriting the whole repo configuration (repeating yourself). A few days ago I created a Q&A topic about copy S3 to S3, where different credentials are needed. I prefer the DRY approach. Less error-prone. I mean to increase the interactivity with resticprofile, such as displaying available repos (if repo & copy defined) to select (select the subject of specified action - mount/stats/check/whatever). I know that Mixins can do a great job and ease configuration, but this requires proper preparation (it is very useful altought not everyone uses it in config files). The interactive mode can be more user-friendly

ryszard-suchocki avatar Jul 26 '22 07:07 ryszard-suchocki