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

xbstream creates non-sparse ibd files and breaks COMPRESSION='zlib'

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 2.4.12
    • Fix Version/s: 8.0.7
    • Component/s: None
    • Labels:
      None

      Description

      Backup source: Percona Server 5.7.19-17, xtrabackup version 2.4.9
      Backup destination: xtrabackup version 2.4.12 (used for xbstream and prepare)

      xtrabackup --binlog-info=ON --use-memory=5000M --target-dir=/tmp --backup --lock-ddl --lock-ddl-timeout=300 --parallel=2 --stream=xbstream | nc 10.0.1.5 3355 # on backup source

      1. on backup destination
        nc -l 3355 | xbstream -x -C /var/lib/mysql1
        xtrabackup --prepare --target-dir /var/lib/mysql1

      #on backup source
      du -h /var/lib/mysql/test/t.ibd
      6.3G /var/lib/mysql/test/t.ibd
      ls -lh
      rw-r---- 1 mysql mysql 14G Jul 5 03:01 t.ibd

      #on backup destination
      du -h /var/lib/mysql1/test/t.ibd
      14G /var/lib/mysql1/test/t.ibd
      ls -lh t.ibd
      rw-r---- 1 mysql mysql 14G Jul  5 06:48 t.ibd
      cp -a --sparse=always t.ibd t.ibd.sparse
      du -h /var/lib/mysql1/test/t.ibd.sparse
      12G /var/lib/mysql1/test/t.ibd.sparse

      After table rebuild with alter table t ALGORITHM=COPY;
      du -h t.ibd
      3.6G t.ibd
      du -h t.ibd --apparent-size
      9.1G t.ibd

      if I'm using rsync for original file 6.3G file (located on backup source):
      rsync --sparse t.ibd /
      du -h /t.ibd
      4.6G /t.ibd
      du --apparent-size -h /t.ibd
      14G t.ibd

      Also rsync --sparse works fine with altered file 3.6G (located on backup destination):
      du -h t.ibd
      2.5G t.ibd
      du --apparent-size -h t.ibd
      9.1G t.ibd

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                sergei.glushchenko Sergei Glushchenko (Inactive)
                Reporter:
                nickolay.ihalainen Nickolay Ihalainen
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 4 days, 7 hours, 4 minutes
                    4d 7h 4m