From 3ccd1cf7427768cb390527a45753e0cc32f4d609 Mon Sep 17 00:00:00 2001 From: Miguel Date: Sun, 12 May 2019 12:56:45 +0200 Subject: added docker tools --- docker_tools/README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 docker_tools/README.md (limited to 'docker_tools/README.md') diff --git a/docker_tools/README.md b/docker_tools/README.md new file mode 100644 index 0000000..876ed31 --- /dev/null +++ b/docker_tools/README.md @@ -0,0 +1,46 @@ +# ABOUT + +This is my collection of short and dirty bash script +to ease the execution of some common docker tasks. + +# RESTORE NEW VOLUME FROM TAR ARCHIVE +./docker\_resotre\_vol.sh \[source-tar-archive\] \[new-target-volume\] + +# BACKUP DOCKER VOLUMES +./docker\_backup\_vol.sh +Run without params for help. Supports --all-vols, --single-vol, --exclude-vol + +# BACKUP DOCKER VOLUME OF A CONTAINER THAT IS NOT RUNNING +docker\_backup\_offline\_vol.sh + +# BACKUP ALL MARIADB AND MYSQL DATABASES +./docker\_backup\_all\_sql.sh +Dumps all runinng containers where the image contains 'mariadb' or 'mysql'. +The root passwords are extracted via 'docker inspect' + +# BACKUP SOME DATA ABOUT RUNNING CONTAINERS +./docker\_backup\_crazy.sh + +The execution of this simple script will hopefully create a backup +of the following entities for all currently running docker containers: + +- environment variables -> to a txt file +- all mounted file binds -> to a gzipped tar file +- all mounted directory binds -> to a gzipped tar file +- all mounted data volumes -> to a gzipped tar file + +The backups will be placed in the current directory and prefixed +with a timestamp and container name. + +# AUTO BACKUP ALL DOCKER-COMPOSE CONTAINERS IN A GIVEN TREE +docker\_compose\_backup.sh + +# CAUTION + +However this was never tested, the scripts will most likely fail +pathetically if variables containing spaces are encountered !!! + +# COPYRIGHT + +by the Software Fools Docker Division, 2017-2018 A.D. + -- cgit v1.2.3