Code Monkey home page Code Monkey logo

debian-ubuntu-mariadb-backup's People

Contributors

imchairmanm avatar nullart 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

debian-ubuntu-mariadb-backup's Issues

prepare-mysql.sh seems to have wrong parameters for restore

Tested with: MariaDB-backup-10.2.11-1

mariabackup --apply-log "${full_backup_dir}"
will definitely not run without --target-dir= in front of the "${full_backup_dir}"

Also according to https://www.percona.com/doc/percona-xtrabackup/LATEST/backup_scenarios/incremental_backup.html which mariabackup is officially based on
shouldn't
--apply-log "${full_backup_dir}"
be
--prepare --apply-log-only --target-dir="${full_backup_dir}"

Furthermore the shouldn't the incremental backups be applied with
--prepare --apply-log-only --target-dir=[directory] --incremental-dir=[incrementaldirectory]
followed with the last incremental backup as
--prepare --apply-log-only --target-dir=[directory] --incremental-dir=[lastincrementaldirectory]

Thank you.

Can't extract :(

Hi,

Thanks for porting these scripts to debian ;)
I've tried to give it a try. I'm currently working on debian 9.
backup-mysql.sh is working correctly, no errors at all.
However, when I try to use extract-mysql.sh I'm facing an error:

#  sudo -u backup extract-mysql.sh *.xbstream
extract-mysql.sh: An unexpected error occurred.  Try checking the "extract-progress.log" file for more information.

Looking at the error log file extract-progress.log this is the error I can see:

Extracting file full-11-13-2017_00-17-02.xbstream

mkdir: created directory './restore'
mkdir: created directory './restore/full-11-13-2017_00-17-02'
xtrabackup: Error: unknown argument: './restore/full-11-13-2017_00-17-02'

Finished work on full-11-13-2017_00-17-02.xbstream

And so on for other backup, either full or incremental.

Regarding backup-mysql.sh I use default options, I did not touch them.

I've tried to run the command line by hand as mariabackup --parallel=4 --decompress from either the restore directory or restore/full-.... directory but it alos failed with this error:

# mariabackup --parallel=4 --decompress
mariabackup based on MariaDB server 10.1.26-MariaDB debian-linux-gnu (x86_64)
mariabackup: Can't change dir to '/tmp/Mon/restore/xtrabackup_backupfiles/' (Errcode: 2 "No such file or directory")
cannot my_setwd /tmp/Mon/restore/xtrabackup_backupfiles/

For what I've seen, xtrabackup_backupfiles dir is missing. Maybe a missing option from backup-mysql.sh in order to create this extra directory?

Thanks for any clue.
Regards
Emmanuel

DON'T WORK - mariabackup based on MariaDB server 10.3.7-MariaDB Linux (x86_64)

DON'T WORK - mariabackup based on MariaDB server 10.3.7-MariaDB Linux (x86_64)

/usr/local/bin/backup-mysql.sh

Backup successful!
Backup created at /backups/mysql/Fri/full-06-22-2018_18-39-45.xbstream

/usr/local/bin/backup-mysql.sh

Backup successful!
Backup created at /backups/mysql/Fri/incremental-06-22-2018_18-40-56.xbstream

extract-mysql.sh *.xbstream

extract-mysql.sh: It looks like something went wrong. Please check the "extract-progress.log" file for additional information

vim /backups/mysql/Fri/extract-progress.log

mkdir: created directory './restore/incremental-06-22-2018_18-40-56'
^Gmbstream: Can't create/write to file '/backups/mysql/Fri//xtrabackup_info.qp' (Errcode: 17 "File exists")
mbstream: failed to create file.

cd /backups/mysql/"$(date +%a)"/restore

ll

full-06-22-2018_18-18-35
full-06-22-2018_18-20-00
full-06-22-2018_18-39-45
incremental-06-22-2018_18-40-56

prepare-mysql.sh

Exactly one full backup directory is required.

extract says something wet wrong but in log all is ok

sudo -u backup extract-mysql.sh *.xbstream
extract-mysql.sh: It looks like something went wrong. Please check the "extract-progress.log" file for additional information

but in log all is ok :

more "extract-progress.log"
Extracting file full-02-20-2018_10-53-01.xbstream
mkdir: created directory './restore'
mkdir: created directory './restore/full-02-20-2018_10-53-01'
mariabackup based on MariaDB server 10.1.26-MariaDB debian-linux-gnu (x86_64)
...
180220 15:25:33 completed OK!
Finished work on full-02-20-2018_10-53-01.xbstream

Extracting file incremental-02-20-2018_10-56-22.xbstream
mkdir: created directory './restore/incremental-02-20-2018_10-56-22'
...
180220 15:25:33 completed OK!
Finished work on incremental-02-20-2018_10-56-22.xbstream

Encryption and decryption don't work

I UNCOMMENTED THE FOLLOWING LINES:
FILE: backup-mysql.sh
uncomment line 11 => encryption_key_file="${parent_dir}/encryption_key"
uncomment Line 37 => declare -ga innobackupex_args=(
uncomment line 38 => "--encrypt=AES256"
uncomment line 39 => "--encrypt-key-file=${encryption_key_file}"
uncomment line 40 => "--encrypt-threads=${processors}"
uncomment line 41 => "--slave-info"
uncomment line 42 => "--incremental"
Add the symbol line 43 => )

FILE: extract-mysql.sh
uncomment line 6 => encryption_key_file="/backups/mysql/encryption_key"
uncomment line 35 => Check whether the encryption key file is available
uncomment line 36 => if [ ! -r "${encryption_key_file}" ]; then
uncomment line 37 => error "Cannot read encryption key at ${encryption_key_file}"
uncomment line 38 => fi
uncomment line 51 => "--decrypt=AES256"
uncomment line 52 => "--encrypt-key-file=${encryption_key_file}"

WHEN I MADE "sudo su - backup extract-mysql.sh *.xbstream" I GET THE FOLLOWINGS ERRORS:
Extracting file incremental-06-22-2018_06-13-55.xbstream
mkdir: created directory './restore/incremental-06-22-2018_06-13-55'
/usr/local/bin/extract-mysql.sh: line 50: incremental-06-22-2018_06-13-55.xbstream: No such file or directory
/usr/local/bin/extract-mysql.sh: line 51: --decrypt=AES256: command not found
/usr/local/bin/extract-mysql.sh: line 52: --encrypt-key-file=/backups/mysql/encryption_key: No such file or directory
mariabackup based on MariaDB server 10.3.7-MariaDB Linux (x86_64)
180622 06:14:22 completed OK!
Finished work on incremental-06-22-2018_06-13-55.xbstream

BUT I HAVE:

  • incremental-06-22-2018_06-13-55.xbstream
  • encrypt-key-file=/backups/mysql/encryption_key

IT'S A BUG OR I MADE SOMETHING WRONG?
Many thanks

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.