Copying a large file system (again)
Tino Schwarze
linux-poweredge.lists at tisc.de
Mon Dec 3 12:05:18 CST 2007
(replying to the list since it might be interesting for others as well)
On Mon, Dec 03, 2007 at 12:30:30PM -0500, Robert Terzi wrote:
> You can use find's -links option to break things up
> into multiple passes by the number of links. Do all
> of the unique (single link files first), then do multiple
> links. Both tar and rsync take a --files-from= option.
>
> find . -type f -links 1 > unique-files
> find . -type f -links +2 > linked-files
>
> tar cf - --files-from unique-files | ssh ...
>
> If necessary you can break things up further to do
> a specific number of links, i.e. try to do the
> files with the max number of links as one pass.
This is smart. I'll probably see whether I can hack up some mini perl or
similar so I can create all the files in one pass - I suppose, the find
alone would take about an hour or so for traversing the file system once.
And I'm not sure about the link counts - there should be hardly any
files with link count 1 (only config and logs).
BTW: Some files have tens of thousands of links.
Thanks,
Tino.
--
www.craniosacralzentrum.de
www.lebensraum11.de
www.spiritualdesign-chemnitz.de
Tino Schwarze * Parkstraße 17h * 09120 Chemnitz
More information about the Linux-PowerEdge
mailing list