# How to rsync InnoDB page compressed datafiles

**URL:** <https://forums.percona.com/t/how-to-rsync-innodb-page-compressed-datafiles/10261>\
**Category:** Percona Server for MySQL\
**Created:** [April 27, 2021, 9:57am UTC](https://forums.percona.com/t/how-to-rsync-innodb-page-compressed-datafiles/10261 "2021-04-27T09:57:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jiri\_Sula](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jiri_sula/32/4770_2.png) [@Jiri\_Sula](https://forums.percona.com/u/Jiri_Sula)\
**Post date:** [April 27, 2021, 9:57am UTC](https://forums.percona.com/t/how-to-rsync-innodb-page-compressed-datafiles/10261/1 "2021-04-27T09:57:42Z")

</div>

Hi all,  
I’m using innodb page compression (lz4 algorithm) in my database. Increased performance is really significant so overall I’m super-excited about change from table-level compression. Now I’m trying to resolve how to rsync datafile to another host, having compression still in place.

I tried “rsync -av --progress --sparse --delete” but files were stored on target server without any compression(du equals ls). After starting service on target server, I double checked that information\_schema.innodb\_tablespaces table is really showing “Compressed” on all tables. Medicine for me = running “optimize table” on all tables to rebuild physically data on disk based on tables definition. But that’s not feasible for me (time + disk space). During my discoveries around I found Vadim’s blog (good, bad, ugly) but nothing more.

Any idea how can I preserve innodb page compression while copying (in general, maybe rsync is not the right tool) datafiles into other server is highly appreciated! Also any experiences appreciated too, I just can’t stand that performance is so good and this last step… is not achievable 🙂

Server env: Debian Buster, kernel 5.4.48, xfsprogs 4.20.0-1, rsync 3.1.3-6, percona server 8.0.22

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 27, 2021, 11:49am UTC](https://forums.percona.com/t/how-to-rsync-innodb-page-compressed-datafiles/10261/2 "2021-04-27T11:49:25Z")

</div>

Hello @Jiri_Sula,  
rsync is certainly not the correct tool here. You should be using xtrabackup to make streaming backups to your storage server. Be sure to add `--parallel 4` (or greater) and use `--stream xbstream` for increased network throughput.
