0

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.

NON
  • 13
  • 2
  • You should *always* have a backup, not only when you're planning a hardware modification. And no, RAID itself is not a backup. – Tilman Schmidt Mar 07 '21 at 15:25
  • @Tilman Yeah, I know that, but because of above reason I couldn't have exact copy of it till now. I have a kind of backup (files before processing) but re-processing them will took weeks so thinking to make a backup of current state. – NON Mar 07 '21 at 15:32

1 Answers1

1

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.

Tilman Schmidt
  • 3,778
  • 10
  • 23
  • Thanks, but I'm worrying OOM because some time ago I tried rsync but just 100GB rsync took 1GB of RAM for me even with --no-inc-recursive option. This NAS has only 4GB of it. Of course there is swap, but still. – NON Mar 07 '21 at 15:48
  • 1
    @NON https://rsync.samba.org/FAQ.html#4 And of course you should put more memory in it, because you actually need it. – Michael Hampton Mar 07 '21 at 17:45
  • Thank you guys. I'll proceed with rsync anyway as you guys suggested. Number of inode of this FS is 85M btw. – NON Mar 08 '21 at 12:52