I have taken an incremental backup of the database in streaming format using the --stream=xbstream and --incremental-lsn command line options.
When I restore my full backup, I run xtrabackup --prepare --apply-log-only --target-dir=/var/lib/mysql
Then I try the following:
$ cat /tmp/backup-incr-2025-04-03_3-xbstream.gz.aes256 | openssl enc -d -aes-256-cbc -pass file:mybackup.key| gzip -d | sudo xbstream -x -C
/var/lib/mysql
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
xbstream: Can’t create/write to file ‘./undo_002.meta’ (OS errno 17 - File exists)
xbstream: failed to create file.
exit code: 1
This is the contents of my datadir after the failed xbstream -x -C:
`$ ls /var/lib/mysql/undo -lh
-rw-r----- 1 root root 16M Apr 3 13:32 /var/lib/mysql/undo_001
-rw-r----- 1 root root 16K Apr 3 13:32 /var/lib/mysql/undo_001.delta
-rw-r----- 1 root root 69 Apr 3 13:32 /var/lib/mysql/undo_001.meta
-rw-r----- 1 root root 16M Apr 3 13:32 /var/lib/mysql/undo_002
-rw-r----- 1 root root 16K Apr 3 13:32 /var/lib/mysql/undo_002.delta
-rw-r----- 1 root root 69 Apr 3 13:32 /var/lib/mysql/undo_002.meta
Am I supposed to extract the streaming backup to its own directory and prepare with --incremental-dir?