Giter Site home page Giter Site logo

ubuntu-1604-mysql-backup's Introduction

ubuntu-1604-mysql-backup

This repository contains a few scripts for automating backups with Percona Xtrabackup and Innobackupex

ubuntu-1604-mysql-backup's People

Contributors

imchairmanm 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ubuntu-1604-mysql-backup's Issues

Why Limit to 7 Days

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?

innobackupex -> xtrabackup?

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

$USER is not set in cron

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.

Error 403

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!

backup-mysql.sh with success,while extra-mysql.sh excute failed due to the 'Invalid key length'

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

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.