How to mirror filesystems with millions of hardlinks?
Solution 1:
You need to upgrade both sides to rsync 3. From the changelog:
- A new incremental-recursion algorithm is now used when rsync is talking
to another 3.x version. This starts the transfer going more quickly
(before all the files have been found), and requires much less memory.
See the --recursive option in the manpage for some restrictions.
It has been over 2 years since rsync 3.0.0 was released, but, unfortunately, most enterprise distributions are based off code older than that, which means you're probably using rsync 2.6.
For reference (if anyone else is having this problem), if you are running rsync 3 already, then you are using options that are incompatible with incremental recursion. From the man page:
Some options require rsync to know the full file list, so these
options disable the incremental recursion mode. These include:
--delete-before, --delete-after, --prune-empty-dirs, and
--delay-updates.
Also, again, both sides must be running rsync 3 for incremental recursion to be supported.
Solution 2:
We have used ext* dump now. Works well, and the restore side doesn't even have to be ext*.
We have done an offline backup, by umounting the device and used dump vf - /dev/vg0/opt | gzip -c > /mnt/backup/ext3dump.gz
.
Here the last lines you could see size, time, speed and the last inode numbers:
DUMP: dumping regular inode 47169535
DUMP: dumping regular inode 47169536
DUMP: Volume 1 completed at: Wed Jun 29 05:42:57 2011
DUMP: Volume 1 54393520 blocks (53118.67MB)
DUMP: Volume 1 took 4:16:43
DUMP: Volume 1 transfer rate: 3531 kB/s
DUMP: 54393520 blocks (53118.67MB)
DUMP: finished in 15403 seconds, throughput 3531 kBytes/sec
DUMP: Date of this level dump: Wed Jun 29 01:24:29 2011
DUMP: Date this dump completed: Wed Jun 29 05:42:57 2011
DUMP: Average transfer rate: 3531 kB/s
DUMP: DUMP IS DONE