d3kad3nt / rsnapshot-docker-compose-backup Goto Github PK
View Code? Open in Web Editor NEWBackup your docker-compose projects with rsnapshot.
License: Apache License 2.0
Backup your docker-compose projects with rsnapshot.
License: Apache License 2.0
The Variable $dockerComposeFile is set In the method _init_vars in abstract_config.py. But it is set to the value of config_path wich doesn't seem to make sense.
It should be possible to backup containers that are not running.
Currently the script crashes if it tries to create config for a container that is not running.
This is also needed for unit tests
Currently this script finds only docker-compose container where the compose-project-name equals the folder name. This is the default.
It would be good to add an setting to change the project name
We already support $serviceName
, $containerID
, $projectFolder
, $volumes
, $image
and $projectName
as variables in backup.ini.
The new variable $containerName
would be useful in backup destination path names because it is unique (in contrast to the default $serviceName
). The docker daemon does not allow two containers with the same name running at the same time.
The container's name is auto-generated by docker but can be overridden by setting container_name
in the compose file.
The Compose Specification defines four valid names for compose files (https://docs.docker.com/compose/compose-application-model/).
The default path for a Compose file is compose.yaml (preferred) or compose.yml that is placed in the working directory. Compose also supports docker-compose.yaml and docker-compose.yml for backwards compatibility of earlier versions. If both files exist, Compose prefers the canonical compose.yaml.
As of now, only docker-compose.yml
seems to be supported.
All names matching the regular expression (docker-)?compose\.y(a)?ml
should be suuported.
To improve the performance and redability of the Backup the python Libary from Docker should be used.
This libary is automaticly installed if docker-compose is installed, but in a few cases this libary is not in the import path, for example in virtual environments. Another reason could be, that a old version of docker-compose is installed that uses the Python2 Version of the libary.
To solve this Problem the current path should exist as a fallback alternative to find the container.
A setting to convert backup_script calls to backup_exec and backup calls would be very helful in mutliple situations:
The problem with this setting is, that the files that are created/changed by backup_script have to be recognized and copied to a temp folder. This is probably relativly complicated.
The Readme schould contain install instructions and the old parts of the readme should be deleted
This Action should merge all the code into one singly py file that can be executed. This py file should be added to the version as a artifact
This can be used to create a project oriented Backup Folder
The Package should be released on PyPI. The Package should automatically be updated when a new release is created.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.