Skip to content

Edzilla2000/mariabackup-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mariabackup for docker

Docker container to backup mariadb instance using mariabackup.
Largery based on https://github.com/khoanguyen96/dockerfiles/tree/master/percona-xtrabackup

To backup:

#!/bin/bash

docker run --rm \
       -e HOST="nextcloud_db" \
       --net webgateway \
       -v /srv/nextcloud/mariadb:/var/lib/mysql \
       -v /srv/mysqlbackup/backup.cnf:/etc/mysql/backup.cnf \
       -v /srv/mysqlbackup/encryption_key:/backups/mysql/encryption_key \
       -v /srv/mysqlbackup/backup:/backups/mysql \
cardonaje/perconaxtrabackup:latest \
    backup-mysql.sh

To extract backup:

#!/bin/bash

docker run --rm \
       -e DAY="Mon" \
       --net webgateway \
       -v /srv/nextcloud/mariadb:/var/lib/mysql \
       -v /srv/mysqlbackup/backup.cnf:/etc/mysql/backup.cnf \
       -v /srv/mysqlbackup/encryption_key:/backups/mysql/encryption_key \
       -v /srv/mysqlbackup/backup:/backups/mysql \
cardonaje/perconaxtrabackup:latest \
    extract-mysql.sh full-12-17-2018_14-29-22.xbstream

To prepare backup:

#!/bin/bash

docker run --rm \
       -e DAY="Mon" \
       --net webgateway \
       -v /srv/nextcloud/mariadb:/var/lib/mysql \
       -v /srv/mysqlbackup/backup.cnf:/etc/mysql/backup.cnf \
       -v /srv/mysqlbackup/encryption_key:/backups/mysql/encryption_key \
       -v /srv/mysqlbackup/backup:/backups/mysql \
cardonaje/perconaxtrabackup:latest \
    prepare-mysql.sh

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published