My experience with using cp to copy 432 million files (39 TB)
1–10 of 267 posts
Re: My experience with using cp to copy 432 million files (39 TB)
#2Re: My experience with using cp to copy 432 million files (39 TB)
#3Re: My experience with using cp to copy 432 million files (39 TB)
#4Re: My experience with using cp to copy 432 million files (39 TB)
#5Re: My experience with using cp to copy 432 million files (39 TB)
#6I would probably have used tar|tar for this, or rsync.
-a, --archive
[...] Note that -a does not preserve hardlinks, because
finding multiply-linked files is expensive. You must
separately specify -H.
If you do specify -H, rsync does keep track of hard links, but presumably at the cost of keeping a data structure similar to cp: -H, --hard-links
This tells rsync to look for hard-linked files in the source and
link together the corresponding files on the destination. Without
this option, hard-linked files in the source are treated as though
they were separate files. [...]
Of course, rsync could be more efficient at keeping track of the hard links than cp, but there's no reason to believe a priori that it would be.Re: My experience with using cp to copy 432 million files (39 TB)
#7I would probably have used tar|tar for this, or rsync.
Rsync at least acts reasonably idempotent, so you can just run it again if it gets interrupted, which is usually why I use it for large copies.
I don't remember off the top of my head if tar handles hard links—it may be inappropriate for this usage.
Re: My experience with using cp to copy 432 million files (39 TB)
#8I would probably have used tar|tar for this, or rsync.
About rsync: if you just use -a, it does not copy hard links correctly: -a, --archive [...] Note that -a does not preserve hardlinks, because finding multiply-linked files is expensive. You must separately specify -H. If you do specify -H, rsync does keep track of hard links, but presumably at the cost of keeping a data structure similar to cp: -H, --hard-links This tells rsync to look for hard-linked files in the so…
Re: My experience with using cp to copy 432 million files (39 TB)
#9Another lesson: routinely scrub your RAID arrays.
Re: My experience with using cp to copy 432 million files (39 TB)
#10In Windows-land, the default copy is pretty anemic, so probably most people avoid it for serious work.
I'd probably use robocopy from the command line. And if I was being lazy, I'd use the Teracopy GUI.
I think my limit for a single copy command has been around 4TB with robocopy--and that was a bunch of large media files, instead of smaller more numerous files. Maybe there's a limit I haven't hit.