Skip to content

PXB-3662 [DOCS] - Improve the documentation of mutual exclusion behav… - #546

Open
patrickbirch wants to merge 2 commits into
8.4from
pxb-3662-8.4
Open

patrickbirch wants to merge 2 commits into
8.4from
pxb-3662-8.4

Conversation

@patrickbirch

Copy link
Copy Markdown
Collaborator

…iour with --tables and --databases 8.4

modified:   docs/create-partial-backup.md

diff --git a/docs/create-partial-backup.md b/docs/create-partial-backup.md
index 880b247e..48b62ce7 100644
--- a/docs/create-partial-backup.md
+++ b/docs/create-partial-backup.md
@@ -19,8 +19,32 @@ There are multiple ways of specifying which part of data is backed up:

Use the `--databases-file` option to list the databases

+The `--tables` and `--databases` options are mutually exclusive. If you use both options in the same command, XtraBackup ignores `--databases` and only uses `--tables`. Use only one of these options per backup operation.
+

The following examples assume a database named test that contains tables named t1 and t2. Run all the commands as root or use the sudo command.

+Only `--databases`:
+
+```shell
+xtrabackup --backup --datadir=/var/lib/mysql --target-dir=/data/backups/ \
+--databases='mysql sys performance_schema test'
+```
+
+Only `--tables`:
+
+```shell
+xtrabackup --backup --datadir=/var/lib/mysql --target-dir=/data/backups/ \
+--tables="^test[.]t1"
+```
+
+Both options. XtraBackup ignores `--databases` and backs up only tables matching `--tables`:
+
+```shell
+xtrabackup --backup --datadir=/var/lib/mysql --target-dir=/data/backups/ \
+--databases='mysql sys performance_schema test' \
+--tables="^test[.]t1"
+```
+

=== "–-tables option"

…iour with --tables and --databases 8.4

	modified:   docs/create-partial-backup.md

	diff --git a/docs/create-partial-backup.md b/docs/create-partial-backup.md
	index 880b247..48b62ce 100644
	--- a/docs/create-partial-backup.md
	+++ b/docs/create-partial-backup.md
	@@ -19,8 +19,32 @@ There are multiple ways of specifying which part of data is backed up:

    Use the `--databases-file` option to list the databases

	+The `--tables` and `--databases` options are mutually exclusive. If you use both options in the same command, XtraBackup ignores `--databases` and only uses `--tables`. Use only one of these options per backup operation.
	+
 The following examples assume a database named `test` that contains tables named `t1` and `t2`. Run all the commands as root or use the sudo command.

	+Only `--databases`:
	+
	+```shell
	+xtrabackup --backup --datadir=/var/lib/mysql --target-dir=/data/backups/ \
	+--databases='mysql sys performance_schema test'
	+```
	+
	+Only `--tables`:
	+
	+```shell
	+xtrabackup --backup --datadir=/var/lib/mysql --target-dir=/data/backups/ \
	+--tables="^test[.]t1"
	+```
	+
	+Both options. XtraBackup ignores `--databases` and backs up only tables matching `--tables`:
	+
	+```shell
	+xtrabackup --backup --datadir=/var/lib/mysql --target-dir=/data/backups/ \
	+--databases='mysql sys performance_schema test' \
	+--tables="^test[.]t1"
	+```
	+
 === "`–-tables` option"

     The first method involves the xtrabackup `–tables` option. The option’s

This branch was successfully deployed

1 active deployment
pxb-3662-8.4 - percona-xtrabackup-docs-8.4 PR #546 — a8608ae3 Deployed Nov 3, 2026 by alina-derkach-oaza
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants