GithubHelp home page GithubHelp logo

alaub81 / backup_docker_scripts Goto Github PK

View Code? Open in Web Editor NEW
134.0 7.0 25.0 55 KB

with these script you are able to backup your docker environment. There is one for the compose project, for mysql or mariadb, for postgres SQL and for normal docker volumes.

Home Page: https://www.laub-home.de/wiki/Docker_Backup_und_Restore_-_eine_kleine_Anleitung

License: GNU Affero General Public License v3.0

Shell 100.00%
docker docker-compose postgres postgressql mysql mariadb backup docker-volumes

backup_docker_scripts's People

Contributors

alaub81 avatar deliciousbob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

backup_docker_scripts's Issues

Mysql Backups are only 1KB

Hello there!

I tried the backup script for mysql/mariadb and the output files are only 1KB.
There are no errors during runtime, except

 create Backup for Database on Container:
  * /run/secrets/mariadb_database DB on mariadb_baikal
./mariadb_backup.sh: line 58: /docker/backup/database/mariadb/mariadb_baikal-/run/secrets/mariadb_database-202111231913.sql.gz: No such file or directory
mysqldump: Got error: 1045: "Access denied for user 'root'@'localhost' (using password: YES)" when trying to connect
ls: cannot access '/docker/backup/database/mariadb/mariadb_baikal*.gz': No such file or directory

But this error only happens with two different containers, there are no errors with the other containers, although i deployed them the same way, so i don't get it, why an error occurs with these two containers.

Do you have an idea what to do?

Greetings

Synology NAS

does these scripts also work for docker in synology nas? I can´t find the path /usr/local/sbin there - so I tried to start a script from somewhere else but nothing happened

Postgres user

Hallo

danke für das Script, allerdings bekomme ich einen Fehler und der dump ist leer.

Start 202112060549 Backup for Databases: 

 create Backup for Database on Container:
  * meine_db

/usr/lib/postgresql/9.5/bin/pg_dumpall: option requires an argument -- 'U'
Try "pg_dumpall --help" for more information.

202112060549 Backup for Databases completed

wenn ich in den User hardcoded in das Script schreibe klappt es:

docker exec $i pg_dumpall -c -U postgres | gzip > $BACKUPDIR/$i-$TIMESTAMP.sql.gz

LG opaque

mariadb backup

Hello,

I just used the script with the Linuxserver mariaDB container and got this error:
" create MYSQL Backup for Database on Container:

  • DB on mariadb
    Usage: mysqldump [OPTIONS] database [tables]
    OR mysqldump [OPTIONS] --databases DB1 [DB2 DB3...]
    OR mysqldump [OPTIONS] --all-databases
    OR mysqldump [OPTIONS] --system=[SYSTEMOPTIONS]]
    For more options, use mysqldump --help"

I added --all-databases to the mysqldump within the script and then it works.

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.