[clue-tech] filesystem copy

Jim Ockers ockers at ockers.net
Tue Jan 2 10:58:45 MST 2007


Hi David,

David L. Willson wrote:
> 
> I want to copy an entire ext3 filesystem, which includes lots of
> hard-links, to another drive.  I use a 500GB volume to maintain daily
> copies of a 320GB volume, where every unchanged file is actually a
> hard-link to the file from the day before (single-instance storage).  I
> want to replicate that volume to another 500GB volume without turning
> each hard-link into a file on the target, and without rewriting the
> entire drive every time.  Ideas?

I think tar will do it since it is aware of inodes & hard links.  (Symlinks
too.)

( cd /old/filesystem ; tar -cf - . ) | ( cd /new/filesystem ; tar -xvlpsf - )

If the new filesystem is mounted under the new one then "." is a poor choice
of what to back up, you should enumerate the subdirectories instead.

Hope this helps,
Jim

-- 
Jim Ockers, P.Eng. (ockers at ockers.net)
Contact info: please see http://www.ockers.net/



More information about the clue-tech mailing list