Hi,
I’m getting started with xtrabackup, backing up my 1st setup of Percona Server for MySQL.
I can create full backups OK, either as normal directory backups or using streams.
With the normal directory approach, where I haven’t compressed or encrypted the backup, it’s easy to just do incremental backups relative to the full backup directory.
It works OK; I can prepare across multiple incremental backups & restore to the server.
I’m not clear on how you do incremental backups when you’re using streams & are encrypting and compressing
If I do a full stream backup, and pipe it through gzip to, and then pipe through openssl to encrypt, I end up with a single file. for example, I create the 1st full stream backup with the command like
xtrabackup --backup --stream=xbstream --extra-lsndir=/pathto/dir0 ... \
| gzip \
| openssl enc -e ... -out /pathto/dir0/streambackup.0.enc.xz
I can decrypt & decompress that output file, and verify that it’s the same as the source database dir.
So now, I want to do a 2nd backup, this time incremental relateive to THAT 1st full backup.
This approach, just pointing at the original dir0 as the relative source,
xtrabackup --backup --stream=xbstream --extra-lsndir=/pathto/dir1 --incremental-basedir=/pathto/dir0 ... \
| gzip \
| openssl enc -e ... -out /pathto/dir1/streambackup.1.enc.xz
doesn’t seem like it’ll work becuase the prior backup is compressed & encrypted still.
When I do an incremental backup relative to a prior backup, do I need to 1st completely decrypt & decompress the prior, streamed backup, so it’s available locally as a fullly populated data directory?
Or is there some inline xtrabackup commands &/or fancy piping that I can do to keep the original & prior backups in their ‘single file’ form?
I guess I’m looking for an all-streams procedure for doing stream-based backups.
So I’m not tied to any particular approach – just one that will reliably work and be done right.