Uploaded image for project: 'Percona XtraBackup'
  1. Percona XtraBackup
  2. PXB-202

xtrabackup_checkpoints avoids compression, but gets encrypted

    XMLWordPrintable

    Details

      Description

      xtrabackup_checkpoints is a snowflake

      .. there is magic that excludes xtrabackup_checkpoints from compression during a backup, but the same rules are not applied to encryption.

      In the docs, we have:

      --extra-lsndir=DIRECTORY
      This option accepts a string argument that specifies the directory in which to save an extra copy of the xtrabackup_checkpoints file. It is passed directly to xtrabackup's --extra-lsndir option. See the xtrabackup documentation for details.

      If you read that as it is, this implies that if you don't use this option then the file is treated just like any other during the backup, which is not the case.

      Since xtrabackup is capable of compressing/decompressing and encrypting/decrypting files itself, without any external commands run by the operator, it would seem that the correct solution for this specific file is:

      1. compress it if compressing other files
      2. encrypt it if encrypting other files
      3. automatically detect that it is compressed/encrypted if using for an incremental backup
       ⇒ xtrabackup --encrypt=AES256 --encrypt-key-file=$(pwd)/xb.key --encrypt-threads=2  --compress-threads=2 --compress --parallel=2 --slave-info --rsync --backup --target-dir=$(pwd)
      
       ⇒ ls -1 | fgrep xtrabackup 
      xtrabackup_binlog_info.qp.xbcrypt
      xtrabackup_checkpoints.xbcrypt
      xtrabackup_info.qp.xbcrypt
      xtrabackup_logfile.qp.xbcrypt
      xtrabackup_slave_info.qp.xbcrypt
      

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                zsolt.parragi Zsolt Parragi
                Reporter:
                ceri.williams Ceri Williams
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: