do-community / ubuntu-1604-mysql-backup Goto Github PK
View Code? Open in Web Editor NEWThis repository contains a few scripts for automating backups with Percona Xtrabackup and Innobackupex
License: MIT License
This repository contains a few scripts for automating backups with Percona Xtrabackup and Innobackupex
License: MIT License
Several of these scripts -- including backup-mysql -- use the $USER environment variable to ensure that the user running the script is the assigned backup user. Because $USER is not set by cron, this causes the script to fail unless the default behavior is overridden with an explicit set of USER.
Further, $USER is a convention and not a reliable indicator of the account running the script. I believe id -un
or logname
is the preferred way to make this check.
Hi there,
I am using your wonderful remote backup tutorial https://www.digitalocean.com/community/tutorials/how-to-backup-mysql-databases-to-object-storage-with-percona-on-ubuntu-16-04 and i am stuck at the very first test: when i try to perform full backup
sudo -u backup remote-backup-mysql.sh
i get error saying that "The bucket name "xxxxxx" is already being used by someone" - which is not correct, because nobody uses it and i am guessing it's just generic 403 error from the server... maybe server doesn't accept credentials? I have triple checked all access keys and secret keys and it's still not working...i have followed the tutorial exactly step by step...
what could be wrong? where should i look at?
Thanks!
Hi!
Thanks for a very useful set of scripts and companion tutorial. I see the scripts use innobackupex
. This script, however, seems to be deprecated in favour of xtrabackup
. Any chance these scripts can be updated to move to xtrabackup
?
Cheers,
Erwin
Great script firstly! I'm just curious why you're organizing by day of the week, and thereby limiting to only 7 backups? You're dating the files in the folder fully (if in a poor format, should be YYYY-MM-DD) so why not extend that to the folder structure?
Hello @imchairmanm
Thanks for your work,I found this repo from a digitalocean blog.
I can regularly use backup-mysql.sh do backups.but when i try to extra the backups with the follow error.
+ for file in '"${@}"'
++ basename full-01-19-2018_00-06-09
+ base_filename=full-01-19-2018_00-06-09
+ restore_dir=./restore/full-01-19-2018_00-06-09
+ printf '\n\nExtracting file %s\n\n' full-01-19-2018_00-06-09.xbstream
Extracting file full-01-19-2018_00-06-09.xbstream
+ mkdir --verbose -p ./restore/full-01-19-2018_00-06-09
mkdir: created directory './restore'
mkdir: created directory './restore/full-01-19-2018_00-06-09'
+ xbstream -x -C ./restore/full-01-19-2018_00-06-09
+ xtrabackup_args=("--parallel=${processors}" "--decrypt=AES256" "--encrypt-key-file=${encryption_key_file}" "--decompress" "--R")
+ xtrabackup --parallel=1 --decrypt=AES256 --encrypt-key-file=/home/disk/backup/mysql/encryption_key --decompress --R --target-dir=./restore/full-01-19-2018_00-06-09
xtrabackup version 2.4.9 based on MySQL server 5.7.13 Linux (x86_64) (revision id: a467167cdd4)
180122 21:58:57 [01] decrypting and decompressing ./ib_buffer_pool.qp.xbcrypt
encryption: both encryption key and key file specified.
encryption: unable to set libgcrypt cipher key - User defined source 1 : Invalid key length
^M^M ^M^Mqpress: Unexpected end of source file -- try the -R flag to recover
Error: decrypt and decompress thread 0 failed.
The ^M^M sign in the log seems strange
I generate key use this command
echo -n $(openssl rand -base64 24) > encryption_key
And the key file
$ cat -A encryption_key
b0E7yOAealJmGCWKqc4s5PR+9t1FL1Sp
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.