Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1691387 - mariabackup offline docs
Summary: mariabackup offline docs
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: mariadb
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Michal Schorm
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-21 14:10 UTC by Karel Volný
Modified: 2019-03-21 14:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Karel Volný 2019-03-21 14:10:53 UTC
Description of problem:
Since mariadb 10.2 module, we provide 'mariabackup' tool. The tool itself gives help about extensive list of options but it doesn't provide any help on usage, and its manpage just refers to the upstream website.
It'd be nice not to rely on online docs availability (on 3rd party site) for basic system configuration.

Version-Release number of selected component (if applicable):
mariadb-backup-10.3.11-2.module+el8+2885+7b8bb354.x86_64

How reproducible:
always

Steps to Reproduce:
1. man mariabackup

Actual results:
MARIABACKUP(1)                                                                   MariaDB Database System                                                                  MARIABACKUP(1)

NAME
       mariabackup - Backup tool

DESCRIPTION
       Use mariabackup --help for details on usage.

       For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/

MariaDB 10.1                                                                          9 August 2018                                                                       MARIABACKUP(1)


Expected results:
MARIABACKUP(1)                                                                   MariaDB Database System                                                                  MARIABACKUP(1)

NAME
       mariabackup - Backup tool

DESCRIPTION
       Mariabackup is a tool based on the Percona XtraBackup technology, which enables performing physical online backups of InnoDB, Aria, and MyISAM tables.

       Mariabackup supports full backup capability for MariaDB server, which includes encrypted and compressed data.

CONFIGURATION
       To configure Mariabackup, set the user name and password by adding the following lines into the [xtrabackup] or [mysqld] section of the *.cnf configuration file that you need to create (for example, /etc/my.cnf.d/mariabackup.cnf):

         [xtrabackup]
         user=myuser
         password=mypassword

       You can also provide the credentials on the commandline using the options `--user=mariabackup` and `--password=mypassword`.

       Mariabackup does not read options in the [mariadb] section of configuration files. If a non-default data directory is specified on a MariaDB server, you must specify this directory in the [xtrabackup] or [mysqld] sections of configuration files, so that Mariabackup is able to find the data directory.

       To specify such a data directory, include the following line in the [xtrabackup] or [mysqld] sections of MariaDB configuration files:

         datadir=/var/mycustomdatadir

       Users of Mariabackup must have the RELOAD, LOCK TABLES, and REPLICATION CLIENT privileges to be able to work with the backup.

USAGE
       To create a backup of a database using Mariabackup, run the following command:

         mariabackup --backup --target-dir <backup_directory>

       The target-dir option defines the directory where the backup files will be stored.

       Note that if you want to perform a full backup, the target directory must be empty or not exist.

       The data files that Mariabackup creates in the target directory are not point-in-time consistent, given that the data files are copied at different times during the backup operation. Before you can restore from a backup, you first need to prepare it to make the data files consistent. You can do so with the --prepare option.

         mariabackup --prepare --target-dir <backup_directory>

       You can restore the backup using either the --copy-back or the --move-back options. The --copy-back option allows you to keep the original backup files. The --move-back option actually moves the backup files to the datadir, so the original backup files are lost.

       Before restoring the backup, the server must not be running and the datadir has to be empty.

         systemctl stop mariadb
         rm -rf <datadir>/*
         mariabackup --copy-back --target-dir <backup_directory>

       After restoration, it might happen you have to restore correct file ownerhip and contexts.

         chown -R mysql:mysql <datadir>
         restorecon -R <datadir>
         systemctl start mariadb

OPTIONS
       See `mariabackup --help` for full list of options and variable values that will actually apply.

SEE ALSO
       The upstream documentation can be found at https://mariadb.com/kb/en/library/mariabackup/

MariaDB 10.3                                                                          9 August 2018                                                                       MARIABACKUP(1)


Additional information:
Note that the above text suggestion is mostly a compilation of https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8-beta/html/configuring_and_deploying_different_types_of_servers/using-databases#backuping-mariadb_physical_backup and https://mariadb.com/kb/en/library/full-backup-and-restore-with-mariabackup/
It'd be also nice to include the incremental backup and other things, the above is just a basic example of how it could look like.


Note You need to log in before you can comment on or make changes to this bug.