Ways to make a backup on RAID5 filesystem (mdadm) with many files

I have a NAS containing RAID5 array (5.4TB in total, 2.9TB in use) using mdadm. Now I plan to modify some hardware of it (especially SATA controller), so I'd like to have a whole backup of this RAID5 filesystem to the external HDD before modification.

As this FS has sooooo many small files and directories, I expect normal rsync or cp would be so slow and end up with out-of-memory error.

So the question is: is there some good ways to make a backup of this kind of things? I'd like to have a mountable backup (files can be accessed when mounted on external HDD) but if it's not possible, I can stand with that.

System details:

[NAS] CentOS 7 (3.10.0-1160.11.1.el7.x86_64) [Filesystem] xfs

[External HDD] Capacity: 4TB

Thanks.


rsync is fine for the purpose. Many small files do not pose a problem for it. Nor will it run out of memory because of the number or smallness of your files. It will certainly take some time to finish, but not more than necessary and certainly not more than other ways of creating a backup. It has the advantage of working incrementally, so you can run it once overnight to copy the bulk of the data and again immediately before the hardware modification to catch up on the latest updates and additions.