Git Product home page Git Product logo

Comments (17)

derphilipp avatar derphilipp commented on August 16, 2024 2

I do have the very same situation - Situations where this would help me:

  • Backup Server settings and data files: /etc and /opt, but no the rest
  • Backup macOS machine, but only certain subdirectories of ~/Library/Containers, that are not temporary, but shall be saved.

Adding multiple locations would futhermore help in the readability:
If we have those locations repeated (including all of the options!) would lead to HUGE yaml file.
Yes: There are YAML anchors that could work around it.
But: Especially with hooks there comes a new problem:

I do have hook that triggers a web-request that the backups are complete. If I now have 5 locations instead of one, they would be triggered 5 times.
Okay, we could filter them - but: What if one of them fails, but the other 4 succeed? Now we still get triggers, although the complete result is invalid.

There are workaround that make most of it possible, yet very hard-to-read and the opposite this great project strives for. I really would love this feature implemented.

from autorestic.

cupcakearmy avatar cupcakearmy commented on August 16, 2024 2

That's a fair point. I'll see how this can be done. For not autorestic uses the path for finding the backups to restore. Probably the way to go is adding a tag to the backups with the name of location. conflicts can then occur if there are multiple config files with the same name. so maybe in addition to the location name one could add some partial hash of the location of the autorestic file.
Would add this in 1.1

from autorestic.

fukawi2 avatar fukawi2 commented on August 16, 2024 2

I do have hook that triggers a web-request that the backups are complete. If I now have 5 locations instead of one, they would be triggered 5 times.

This is my issue also. At the moment I'm using / as the source, but have a huge generic list of excludes to filter it down which is ugly and error-prone. For example, I just rolled out to a new host, and missed adding the mount point where the backups were being written to, so I was recursively backing up the backups to the same backup location 😬 You can guess how well that went πŸ˜†

from autorestic.

cupcakearmy avatar cupcakearmy commented on August 16, 2024 2

From a backwards compatibility standpoint makes sence, but I'm not sure. creates unexpected behaviour.

Maybe add a dir option to the hooks object where one can specify a diverging cwd.

The update will probably have multiple breaking changes anyways, so maybe do it cleanly directly.

from autorestic.

cupcakearmy avatar cupcakearmy commented on August 16, 2024 1

Do tiu have any config examples for 1.5? Specifically for adding multiple folders?πŸ˜ƒ

Actually not xD

It's basically just an array

from:
  - /foo/bar
  - /bar/foo

I'll add them today, thanks! forgot to document it xD

from autorestic.

sebdanielsson avatar sebdanielsson commented on August 16, 2024 1

That’s easy!
Maybe also update the examples with version: 2?😎

from autorestic.

cupcakearmy avatar cupcakearmy commented on August 16, 2024

While restic supports multiple folders autorestic revolves around the concept that the from key if a directory. That assumtion is all over the code and would be quite tidious work to change that, so I don't think the benefits outweight the pros.
What would be a use case?

from autorestic.

cupcakearmy avatar cupcakearmy commented on August 16, 2024

would not expect to getting it done in the next week or so thought :)

from autorestic.

sebdanielsson avatar sebdanielsson commented on August 16, 2024

I use it to automate backups of my VPS to S3 storage.☺️ When moving to a new VPS I can simply run the following and always get the latest versions of my files without the need to specify multiple snapshot ids:
restic restore latest /

from autorestic.

cupcakearmy avatar cupcakearmy commented on August 16, 2024

Also support for docker has to be considered.

from autorestic.

cupcakearmy avatar cupcakearmy commented on August 16, 2024

I use it to automate backups of my VPS to S3 storage.☺️ When moving to a new VPS I can simply run the following and always get the latest versions of my files without the need to specify multiple snapshot ids:
restic restore latest /

Yeah I see. I need to think about it about though, as currently alls the commands are executed in the directory of the from path. Also the hooks.

from autorestic.

MrSuicideParrot avatar MrSuicideParrot commented on August 16, 2024

Currently, is there any plan to add this feature?

from autorestic.

cupcakearmy avatar cupcakearmy commented on August 16, 2024

Will be added soon (1-2 weeks aprox)

Would like to have some feedback first though.

Hooks: currently they are run in the folder of the path.

Posible solutions (i'm open for suggestions):

  1. Always run hook scripts from the .autorestic.yml dir.
  2. Keep same behaviour as now when the path is only 1, otherwise from config file dir if >1

Pruning & Recovering

right now autorestic find relevant snapshots by filtering by path, that is not doable anymore if there are many of them. My proposal would be to add tags in the form of ar:location:myLocationName to each snapshot, also rename the cron tag to ar:cron so they are all prefixed. I really like this approach, seems clean.

Any ideas/thought?

from autorestic.

MrSuicideParrot avatar MrSuicideParrot commented on August 16, 2024

It's good to know that you are developing this feature for autorestic! :) It adds a lot of use cases.

Regarding to possible solutions for the hooks situation, I think the second option is better because it maintains backwards compatibility.

But I have another suggestion, the hook's directory is always the first folder in the backup list. With these, we maintain compatibility and we have a single rule for everything. What do you think?

from autorestic.

sebdanielsson avatar sebdanielsson commented on August 16, 2024

πŸŽ‰πŸ˜ƒπŸ‘Œ

from autorestic.

sebdanielsson avatar sebdanielsson commented on August 16, 2024

Do tiu have any config examples for 1.5? Specifically for adding multiple folders?πŸ˜ƒ

from autorestic.

sebdanielsson avatar sebdanielsson commented on August 16, 2024

Will be added soon (1-2 weeks aprox)

Would like to have some feedback first though.

Hooks: currently they are run in the folder of the path.

Posible solutions (i'm open for suggestions):

  1. Always run hook scripts from the .autorestic.yml dir.
  2. Keep same behaviour as now when the path is only 1, otherwise from config file dir if >1

Pruning & Recovering

right now autorestic find relevant snapshots by filtering by path, that is not doable anymore if there are many of them. My proposal would be to add tags in the form of ar:location:myLocationName to each snapshot, also rename the cron tag to ar:cron so they are all prefixed. I really like this approach, seems clean.

Any ideas/thought?

Could you add the name autorestic.yml without the dot before when searching the path ~/.config/autorestic. That's how most software that I run work.πŸ˜ƒ

from autorestic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.