This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| TMPFILE="/tmp/xtrabackup-runner.$$.tmp" | |
| USEROPTIONS="--user=${MYSQL_USER} --password=${MYSQL_PASSWORD} --host=${MYSQL_HOST}" | |
| BACKDIR=/srv/mysql-bak | |
| BASEBACKDIR=$BACKDIR/base | |
| INCRBACKDIR=$BACKDIR/incr | |
| FULLBACKUPCYCLE=604800 # Create a new full backup every X seconds | |
| KEEP=1 # Number of additional backups cycles a backup should kept for. | |
| START=`date +%s` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Carries out a full mysqldump, calls percona-xtrabackup and then | |
| # copies the sql dump, the percona backup and your mysql bin logs | |
| # to S3 using s3cmd http://s3tools.org/s3cmd | |
| # | |
| # TODO: extract out the S3 backup stuff to make it optional, and so | |
| # other s3 programs can replace the s3cmd call. | |
| # TODO: the if [ $? == 0 ] alert blocks should be a function | |
| # TODO: make the if [ $? == 0 ] if [ $? != 0 ] more consistent - test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #: stolen from: https://github.com/sayajin101/Galera-Cluster-Percona-Backup | |
| ############################################################################################## | |
| # Please install the following packages & repositories first # | |
| # rpm -Uhv http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm # | |
| # qpress.x86_64 rsync.x86_64 percona-xtrabackup.x86_64 # | |
| ############################################################################################## | |
| [ $(which qpress > /dev/null 2>&1; echo ${?}) -ne 0 ] && { echo -e "\nqpress is required...exiting"; exit 1; }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| owncloud: | |
| image: owncloud | |
| links: | |
| - mariadb:mysql | |
| - redis:redis | |
| ports: | |
| - 8081:80 | |
| volumes: | |
| - /opt/docker-persist/owncloud/apps:/var/www/html/apps | |
| - /opt/docker-persist/owncloud/config:/var/www/html/config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Script to create full and incremental backups (for all databases on server) using innobackupex from Percona. | |
| # http://www.percona.com/doc/percona-xtrabackup/innobackupex/innobackupex_script.html | |
| # | |
| # (C)2017 Piotr Gbyliczek (p.gbyliczek at node4.co.uk) | |
| # - changed to use build in compression mechanism | |
| # - corrected restore process (restore from mixed compressed and uncompressed incrementals is supported as well) | |
| # - tidied up script a bit and added new checks | |
| # - removed unneeded xbstream usage (useful only for network transfers, not compatible with incremental backups) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Create a full or incremental xtrabackup | |
| # In the cron job, set it like below: | |
| ## xtrabackup weekly full backup (Saturday, 9 PM UTC == Sunday, 5 AM MYT) | |
| ## 0 21 * * 6 /root/backups/scripts/xtrabackup.sh full > /dev/null | |
| ## xtrabackup daily incremental backup (Sunday->Friday, 9 PM UTC == Monday->Saturday, 5 AM MYT) | |
| ## 0 21 * * 0-5 /root/backups/scripts/xtrabackup.sh incremental > /dev/null | |
| # Note: | |
| ## - For every full backup taken, all created incremental backups will be deleted. |
1/03/2023