Closed tokejepsen closed 6 years ago
avalon --backup path/to/backup/directory
I'd suggest (1) backups are made to a single, compressed zip file (Python ships with the zip
module) and (2) not providing a path stores the result in the current working directory, such that you can type..
$ avalon --backup
avalon-2018_06_09.zip created
$ avalon --restore avalon-2018_06_09.zip
The single zip means we can pack all things Avalon in there and the user won't have to know or care about what those things are. It may well include the physical files too, to make it an all around backup solution for the entire VFX production. As things scale, we could introduce individual filter files (like the .gitignore in explicit directories), additional flags (e.g. --dbOnly
) or special purpose data during publishing ("noBackup: true" for transient files like caches etc.).
Bottom line being that no one likes backing things up and that's better to take up too much space and time than too much of anyone's time and attention.
For starters, this zip file can include just the mongodb so we've got somewhere to start from.
Thoughts?
Yeah, that sounds like a good idea!
Also is the automatic deployment to Docker Hub enabled?
There's an issue with their website at the moment, waiting for a response here: https://github.com/docker/hub-feedback/issues/1522
For the time being, I'll need to push it manually.
This is ready to merge, if you are happy @mottosso ?
I'm very happy!
What did you think about starting tests?
What did you think about starting tests?
What sort of tests? There are tests in core. Tests for the CLI in this repo? That could be a good idea.
What sort of tests? There are tests in core. Tests for the CLI in this repo? That could be a good idea.
Yeah, testing the logic of the back/restore for now. But could imagine there being more in the future.
Sure, should be straightforward enough now that it's all in a Docker container. Could simply install it on Travis per push and run tests with everything in place.
Usage
avalon --backup path/to/backup/directory
avalon --restore path/to/json/file
oravalon --restore path/to/directory/of/json/files
We discussed backing up to the samba share in #9, but that would mean having write access to the samba, which we currently don't have when using the avalon executable.
I just copied the code from the examples export and import, because I couldn't get the mentioned code to work.
Now with the added logic to this distribution, maybe we need to start thinking about tests?
Also is the automatic deployment to Docker Hub enabled?