'mariabackup --prepare': Cannot open config file, backup-my.cnf

Comments

8 comments

  • Avatar
    testjetco

    Anyone have tried mariabackup before and met the same issue?

  • Avatar
    Vishal Kasle

    Have you tried changing the ownership of the backup directory to mysql:mysql and then prepare the backup? It should work as suspect a permissions issue. 

     

  • Avatar
    testjetco

    Not work.  I have changed the file ownership for /tmp/backup/mariadb-backup-20181210182451/ to mysql:mysql

    Still 'cannot open backup-my.cnf for reading'.  Anyone may help?

  • Avatar
    testjetco

    Here below are the backup files:

    [root@ekycdb1 mariadb-backup-20181214213349]# ll
    total 276
    -rw-r-----. 1 root root    420 Dec 14 21:33 aria_log.00000001.qp
    -rw-r-----. 1 root root    129 Dec 14 21:33 aria_log_control.qp
    -rw-r-----. 1 root root    338 Dec 14 21:33 backup-my.cnf.qp
    -rw-r-----. 1 root root   1115 Dec 14 21:33 ib_buffer_pool.qp
    -rw-r-----. 1 root root 247322 Dec 14 21:33 ibdata1.qp
    -rw-r-----. 1 root root    428 Dec 14 21:33 ib_logfile0.qp
    -rw-r-----. 1 root root    101 Dec 14 21:33 xtrabackup_checkpoints
    -rw-r-----. 1 root root    132 Dec 14 21:33 xtrabackup_galera_info.qp
    -rw-r-----. 1 root root    496 Dec 14 21:33 xtrabackup_info.qp

    As I used '--compress' to back up MariaDB, the db files were compressed.  The backup-my.cnf file was backed up and compressed as 'backup-my.cnf.qp'.  'backup-my.cnf' does not exist.

    As I am using 'root' to perform '--prepare' operation, file permission should not be an issue.  Should I decompress the backup files first before doing any '--prepare' operation?

  • Avatar
    testjetco

    When I tried to perform --decompress, I got the following error:

    # mariabackup --decompress --target-dir /tmp/backup/mariadb-backup-20181214213349
    mariabackup based on MariaDB server 10.3.10-MariaDB Linux (x86_64)
    181214 21:49:12 [01] decompressing ./ib_logfile0.qp
    sh: qpress: command not found
    cat: write error: Broken pipe
    Error: thread 0 failed.

  • Avatar
    Krzysztof Ksiazek

    Hi, 

    Yes, to prepare the backup it has to be decompressed. The issue you have is caused by the fact that you don't have qpress installed on your system. Please find some links I found that seem to be relevant to this case:

    https://mariadb.com/kb/en/library/mariabackup-options/#-decompress
    https://jira.mariadb.org/browse/MDEV-15069

    As per the jira, you can install qpress manually:

    wget http://www.quicklz.com/qpress-11-linux-x64.tar

    tar xf qpress-11-linux-x64.tar

    sudo cp qpress /usr/bin/qpress
    sudo chmod 755 /usr/bin/qpress
    sudo chown root:root /usr/bin/qpress

  • Avatar
    testjetco

    Install qpress to /usr/bin solved the decompress issue

  • Avatar
    testjetco

    I could decompress the backup files.  Then I could use --prepare option to normalize the backup files.  The file, backup-my.cnf, does exist inside the backup path after decompress.  No need to create ourselves.

Please sign in to leave a comment.

Powered by Zendesk