Comments (17)
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.
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.
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.
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.
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.
Thatβs easy!
Maybe also update the examples with version: 2
?π
from autorestic.
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.
would not expect to getting it done in the next week or so thought :)
from autorestic.
I use it to automate backups of my VPS to S3 storage.
restic restore latest /
from autorestic.
Also support for docker has to be considered.
from autorestic.
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.
Currently, is there any plan to add this feature?
from autorestic.
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):
- Always run hook scripts from the
.autorestic.yml
dir. - 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.
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.
πππ
from autorestic.
Do tiu have any config examples for 1.5? Specifically for adding multiple folders?π
from autorestic.
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):
- Always run hook scripts from the
.autorestic.yml
dir.- 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 thecron
tag toar: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)
- Hooks to have access to location path HOT 1
- Cron updates timestamp even when backup fails
- `uninstall` command is broken
- Docker compose example in the docker installation guide
- 'locations[storage]' has invalid keys: forgetoption HOT 4
- Keep up with restic releases HOT 2
- Restic repository not initialized by default in GCP
- Bug: Docker volume backup to B2 fails ("context deadline exceeded") HOT 1
- forget dryRun is always false on backup task
- Support backing up Docker volumes via the REST backend
- autorestic running backup.ymlοΌrestic print 'unknown flag: --use-fs-snapshot' HOT 1
- Copy a repo
- Add a cron option to the forget/prune policies
- Suggestion: don't require 'from' key in locations that use include arguments.
- $PATH being ignored by autorestic HOT 4
- Showing during the backup the progress in percentage of every single location
- Add more verbose error messages HOT 4
- Flag locations as paused HOT 2
- Error when running as docker container
- Error in forget / prune does not trigger failure hook
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autorestic.