Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/apt-download-deb.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ The following example downloads Percona XtraBackup {{release}} release package f
1. Use `wget` to download the `DEB` package:

```shell
wget https://downloads.percona.com/downloads/Percona-XtraBackup-{{vers}}/Percona-XtraBackup-{{release}}/binary/debian/jammy/x86_64/percona-xtrabackup-84_{{release}}-1.jammy_amd64.deb
wget https://downloads.percona.com/downloads/Percona-XtraBackup-{{vers}}/Percona-XtraBackup-{{release}}/binary/debian/noble/x86_64/percona-xtrabackup-84_{{release}}-1.noble_amd64.deb
```

2. Install Percona XtraBackup by using `dpkg`:

```shell
sudo dpkg -i percona-xtrabackup-84_{{release}}-1.jammy_amd64.deb
sudo dpkg -i percona-xtrabackup-84_{{release}}-1.noble_amd64.deb
```

## Common dependencies
Expand Down
76 changes: 38 additions & 38 deletions docs/apt-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ Install Percona XtraBackup, like many other Percona products, with the `percona-
??? example "Expected output"

```{.text .no-copy}
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
Get:4 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [2458 kB]
...
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:2 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Reading package lists... Done
```

2. Install the `curl` download utility if it's not installed:
Expand Down Expand Up @@ -97,14 +94,13 @@ Install Percona XtraBackup, like many other Percona products, with the `percona-
??? example "Expected output"

```{.text .no-copy}
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
Get:4 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [2458 kB]
...
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Hit:1 http://repo.percona.com/prel/apt noble InRelease
Hit:2 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:3 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:5 http://repo.percona.com/telemetry/apt noble InRelease
Hit:6 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Reading package lists... Done
```

6. Enable the specific percona-release product.
Expand All @@ -116,18 +112,17 @@ Install Percona XtraBackup, like many other Percona products, with the `percona-

```{.text .no-copy}
* Enabling the Percona Packaging Repository repository
Hit:1 http://repo.percona.com/pmm2-client/apt jammy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://repo.percona.com/prel/apt jammy InRelease
Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:5 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Get:6 http://repo.percona.com/pxb-84-lts/apt jammy InRelease [12.8 kB]
Hit:7 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:8 http://repo.percona.com/telemetry/apt jammy InRelease
Get:9 http://repo.percona.com/pxb-84-lts/apt jammy/main Sources [855 B]
Get:10 http://repo.percona.com/pxb-84-lts/apt jammy/main amd64 Packages [3547 B]
Fetched 17.2 kB in 4s (3958 B/s)
Reading package lists... Done
Hit:1 http://repo.percona.com/prel/apt noble InRelease
Get:2 http://repo.percona.com/pxb-84-lts/apt noble InRelease [12.8 kB]
Hit:3 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:4 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:5 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:6 http://repo.percona.com/telemetry/apt noble InRelease
Hit:7 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Get:8 http://repo.percona.com/pxb-84-lts/apt noble/main Sources [2623 B]
Get:9 http://repo.percona.com/pxb-84-lts/apt noble/main amd64 Packages [15.1 kB]
Fetched 30.5 kB in 4s (7186 B/s)
Reading package lists...
```

7. Install Percona XtraBackup.
Expand All @@ -139,17 +134,22 @@ Install Percona XtraBackup, like many other Percona products, with the `percona-
??? example "Expected output"

```{.text .no-copy}
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
libaio1 libcurl4-openssl-dev libdbd-mysql-perl libdbi-perl libev4 libgdbm-compat4
libgdbm6 libmysqlclient21 libperl5.34 libpopt0 mysql-common netbase perl
perl-modules-5.34 rsync zstd
libaio1t64 libcurl4-openssl-dev libev4t64 libpopt0 lz4 rsync zstd
Suggested packages:
libcurl4-doc libidn-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev
libssl-dev pkg-config zlib1g-dev libdbd-mysql-perl openssh-client
openssh-server python3 python3-braceexpand
The following NEW packages will be installed:
libaio1t64 libcurl4-openssl-dev libev4t64 libpopt0 lz4 percona-xtrabackup-84
rsync zstd
0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded.
...
Setting up libdbd-mysql-perl:amd64 (4.050-5ubuntu0.22.04.1) ...##############.......]
Setting up percona-xtrabackup-84 (8.4.0-1-1.jammy) ...#########################.....]
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...###########################...]
Setting up percona-xtrabackup-84 ({{release}}-1.noble) ...
Processing triggers for libc-bin (2.39-0ubuntu8.9) ...
```

8. Verify the installation.
Expand All @@ -161,7 +161,7 @@ Install Percona XtraBackup, like many other Percona products, with the `percona-
??? example "Expected output"

```{.text .no-copy}
xtrabackup version 8.4.0-1 based on MySQL server 8.4.0 Linux (x86_64) (revision id: da6e1abd)
xtrabackup version {{release}} based on MySQL server 8.4.0 Linux (x86_64) (revision id: 4093cfd8)
```

9. To decompress backups made using `LZ4` or `ZSTD` compression algorithm, install the corresponding package:
Expand Down
10 changes: 5 additions & 5 deletions docs/binary-tarball.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ The following example downloads the tarball. Run the following command as root o


```shell
wget https://downloads.percona.com/downloads/Percona-XtraBackup-8.4/Percona-XtraBackup-8.4.0-1/binary/tarball/percona-xtrabackup-8.4.0-1-Linux-x86_64.glibc2.28.tar.gz
wget https://downloads.percona.com/downloads/Percona-XtraBackup-8.4/Percona-XtraBackup-{{release}}/binary/tarball/percona-xtrabackup-{{release}}-Linux-x86_64.glibc2.28.tar.gz
```

The output displays the following information:

??? example "Expected output"

```{.text .no-copy}
--2024-10-09 04:44:36-- https://downloads.percona.com/downloads/Percona-XtraBackup-8.4/Percona-XtraBackup-8.4.0- 1/binary/tarball/percona-xtrabackup-8.4.0-1-Linux-x86_64.glibc2.28.tar.gz
--2024-10-09 04:44:36-- https://downloads.percona.com/downloads/Percona-XtraBackup-8.4/Percona-XtraBackup-{{release}}/binary/tarball/percona-xtrabackup-{{release}}-Linux-x86_64.glibc2.28.tar.gz
Resolving downloads.percona.com (downloads.percona.com)... 147.135.54.159, 2604:2dc0:200:69f::2
Connecting to downloads.percona.com (downloads.percona.com)|147.135.54.159|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 439358509 (419M) [application/gzip]
Saving to: ‘percona-xtrabackup-8.4.0-1-Linux-x86_64.glibc2.28.tar.gz’
Saving to: ‘percona-xtrabackup-{{release}}-Linux-x86_64.glibc2.28.tar.gz’

percona-xtrabackup-8.4.0-1-Linux-x86_6 100%
percona-xtrabackup-{{release}}-Linux-x86_6 100%
[============================================================================>] 419.00M 6.67MB/s in 94s

2024-10-09 04:46:10 (4.48 MB/s) - ‘percona-xtrabackup-8.4.0-1-Linux-x86_64.glibc2.28.tar.gz’ saved
2024-10-09 04:46:10 (4.48 MB/s) - ‘percona-xtrabackup-{{release}}-Linux-x86_64.glibc2.28.tar.gz’ saved
[439358509/439358509]
```
13 changes: 5 additions & 8 deletions docs/create-compressed-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,12 @@ xtrabackup --backup --compress --compress-threads=4 \

```{.text .no-copy}
...
170223 13:00:38 [01] Compressing ./test/sbtest1.frm to /tmp/compressed/test/sbtest1.frm.qp
170223 13:00:38 [01] ...done
170223 13:00:38 [01] Compressing ./test/sbtest2.frm to /tmp/compressed/test/sbtest2.frm.qp
170223 13:00:38 [01] ...done
2026-10-13T17:15:05.557481-00:00 2 [Note] [MY-011825] [Xtrabackup] space_id: 2, Compressing ./test/t1.ibd to /data/compressed/test/t1.ibd.zst, size 11534336 (11.00 MiB)
2026-10-13T17:15:05.575040-00:00 2 [Note] [MY-011825] [Xtrabackup] space_id: 2, Done: Compressing ./test/t1.ibd to /data/compressed/test/t1.ibd.zst
...
170223 13:00:39 [00] Compressing xtrabackup_info
170223 13:00:39 [00] ...done
xtrabackup: Transaction log of lsn (9291934) to (9291934) was copied.
170223 13:00:39 completed OK!
2026-10-13T17:15:06.622555-00:00 0 [Note] [MY-011825] [Xtrabackup] Compression ratio: 21.73x
2026-10-13T17:15:07.624119-00:00 0 [Note] [MY-011825] [Xtrabackup] Transaction log of lsn (38173174) to (38173210) was copied.
2026-10-13T17:15:07.853292-00:00 0 [Note] [MY-011825] [Xtrabackup] completed OK!
```

## Next step
Expand Down
65 changes: 31 additions & 34 deletions docs/create-full-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,34 +54,26 @@ The following is an example of the output:
??? example "Expected output"

```{.text .no-copy}
160906 10:19:17 Finished backing up non-InnoDB tables and files
160906 10:19:17 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
xtrabackup: The latest check point (for incremental): '62988944'
xtrabackup: Stopping log copying thread.
.160906 10:19:18 >> log scanned up to (137343534)
160906 10:19:18 Executing UNLOCK TABLES
160906 10:19:18 All tables unlocked
160906 10:19:18 Backup created in directory '/data/backups/'
160906 10:19:18 [00] Writing backup-my.cnf
160906 10:19:18 [00] ...done
160906 10:19:18 [00] Writing xtrabackup_info
160906 10:19:18 [00] ...done
xtrabackup: Transaction log of lsn (26970807) to (137343534) was copied.
160906 10:19:18 completed OK!
...
2026-10-13T17:14:12.911323-00:00 0 [Note] [MY-011825] [Xtrabackup] Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
2026-10-13T17:14:12.912983-00:00 0 [Note] [MY-011825] [Xtrabackup] The latest check point (for incremental): '36478353'
2026-10-13T17:14:12.912994-00:00 0 [Note] [MY-011825] [Xtrabackup] Stopping log copying thread at LSN 36479260
2026-10-13T17:14:12.916037-00:00 0 [Note] [MY-011825] [Xtrabackup] Executing UNLOCK TABLES
2026-10-13T17:14:12.916228-00:00 0 [Note] [MY-011825] [Xtrabackup] All tables unlocked
2026-10-13T17:14:12.917457-00:00 0 [Note] [MY-011825] [Xtrabackup] Backup created in directory '/data/backups/'
2026-10-13T17:14:12.917481-00:00 0 [Note] [MY-011825] [Xtrabackup] MySQL binlog position: filename 'binlog.000004', position '198', GTID of the last change '78cf2c47-c729-11f1-90e4-f23a559b785b:1-5'
2026-10-13T17:14:12.921613-00:00 0 [Note] [MY-011825] [Xtrabackup] Backup size: 98.59 MiB (103373868 bytes)
2026-10-13T17:14:13.924839-00:00 0 [Note] [MY-011825] [Xtrabackup] Transaction log of lsn (36478353) to (36479270) was copied.
2026-10-13T17:14:14.161363-00:00 0 [Note] [MY-011825] [Xtrabackup] completed OK!
```

The process ends with the following statement; the
value of the `<LSN>` depends on your system:

```shell
xtrabackup: Transaction log of lsn (<LSN>) to (<LSN>) was copied.
```
The last line of the output is `completed OK!`. Also check the exit code of the command: `0` means that the backup succeeded, any other value means that it failed.

!!! note

Log copying thread checks the transactional log every second to see if there were any new log records written that need to be copied, but there is a chance that the log copying thread might not be able to keep up with the amount of writes that go to the transactional logs, and will hit an error when the log records are overwritten before they could be read.

After the backup is finished, the target directory will contain files such as the following, assuming you have a single InnoDB table `test.tbl1` and you are using MySQL’s innodb_file_per_table option:
After the backup is finished, the target directory will contain files such as the following, for a server with a `test` database that contains two InnoDB tables:

```shell
ls -lh /data/backups/
Expand All @@ -92,19 +84,24 @@ The result should look like this:
??? example "Expected output"

```{.text .no-copy}
total 182M
drwx------ 7 root root 4.0K Sep 6 10:19 .
drwxrwxrwt 11 root root 4.0K Sep 6 11:05 ..
-rw-r----- 1 root root 387 Sep 6 10:19 backup-my.cnf
-rw-r----- 1 root root 76M Sep 6 10:19 ibdata1
drwx------ 2 root root 4.0K Sep 6 10:19 mysql
drwx------ 2 root root 4.0K Sep 6 10:19 performance_schema
drwx------ 2 root root 4.0K Sep 6 10:19 sbtest
drwx------ 2 root root 4.0K Sep 6 10:19 test
drwx------ 2 root root 4.0K Sep 6 10:19 world2
-rw-r----- 1 root root 116 Sep 6 10:19 xtrabackup_checkpoints
-rw-r----- 1 root root 433 Sep 6 10:19 xtrabackup_info
-rw-r----- 1 root root 106M Sep 6 10:19 xtrabackup_logfile
total 76M
-rw-r----- 1 root root 447 Oct 13 17:14 backup-my.cnf
-rw-r----- 1 root root 198 Oct 13 17:14 binlog.000004
-rw-r----- 1 root root 16 Oct 13 17:14 binlog.index
-rw-r----- 1 root root 5.6K Oct 13 17:14 ib_buffer_pool
-rw-r----- 1 root root 12M Oct 13 17:14 ibdata1
drwxr-x--- 2 root root 4.0K Oct 13 17:14 mysql
-rw-r----- 1 root root 31M Oct 13 17:14 mysql.ibd
drwxr-x--- 2 root root 4.0K Oct 13 17:14 performance_schema
drwxr-x--- 2 root root 4.0K Oct 13 17:14 sys
drwxr-x--- 2 root root 4.0K Oct 13 17:14 test
-rw-r----- 1 root root 16M Oct 13 17:14 undo_001
-rw-r----- 1 root root 16M Oct 13 17:14 undo_002
-rw-r----- 1 root root 59 Oct 13 17:14 xtrabackup_binlog_info
-rw-r----- 1 root root 134 Oct 13 17:14 xtrabackup_checkpoints
-rw-r----- 1 root root 675 Oct 13 17:14 xtrabackup_info
-rw-r----- 1 root root 3.5K Oct 13 17:14 xtrabackup_logfile
-rw-r----- 1 root root 39 Oct 13 17:14 xtrabackup_tablespaces
```

The backup can take a long time, depending on how large the database is. It is safe to cancel at any time, because xtrabackup does not modify the database.
Expand Down
31 changes: 17 additions & 14 deletions docs/create-incremental-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ content depending on your LSN nuber:
```{.text .no-copy}
backup_type = full-backuped
from_lsn = 0
to_lsn = 1626007
last_lsn = 1626007
compact = 0
recover_binlog_info = 1
to_lsn = 36483306
last_lsn = 36483316
flushed_lsn = 36483306
redo_memory = 0
redo_frames = 0
```

Now that you have a full backup, you can make an incremental backup based on it. Use the following command:
Expand All @@ -61,11 +62,12 @@ content to the following:

```{.text .no-copy}
backup_type = incremental
from_lsn = 1626007
to_lsn = 4124244
last_lsn = 4124244
compact = 0
recover_binlog_info = 1
from_lsn = 36483306
to_lsn = 37325944
last_lsn = 37326587
flushed_lsn = 37326552
redo_memory = 0
redo_frames = 0
```

`from_lsn` is the starting LSN of the backup and for incremental it has to be the same as `to_lsn` (if it is the last checkpoint) of the previous/base backup.
Expand All @@ -83,11 +85,12 @@ This folder also contains the `xtrabackup_checkpoints`:

```{.text .no-copy}
backup_type = incremental
from_lsn = 4124244
to_lsn = 6938371
last_lsn = 7110572
compact = 0
recover_binlog_info = 1
from_lsn = 37325944
to_lsn = 38170427
last_lsn = 38170427
flushed_lsn = 38170427
redo_memory = 0
redo_frames = 0
```

!!! note
Expand Down
3 changes: 2 additions & 1 deletion docs/encrypt-backups.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,6 @@ You should check the last line of the output for a success message:
??? example "Expected output"

```{.text .no-copy}
150318 11:08:13 xtrabackup: completed OK!
...
2026-10-13T17:15:31.497740-00:00 0 [Note] [MY-011825] [Xtrabackup] completed OK!
```
Loading
Loading