[Nottingham] Question: Best command for copying large filesystem between disks?

Martin martin at ml1.co.uk
Fri May 24 16:47:50 UTC 2013


On 24/05/13 17:35, Dan Caseley wrote:
> cp is the obvious goto. Have you got anything "special" in either file
> system like symlinks or hardlinks? Are they both dumb data storage
> partitions?

Very good point easily overlooked, thanks:

Yes there are hardlinks in there. There shouldn't be any special files.
Also the uid/gid will be different to the temporary system that is doing
the transfer.

So, to avoid the disks overflowing, keeping the hardlinks as hardlinks
is a very good idea. Keeping the original uid/gid is also a must.

So that's a few extra flags for the "cp" at least...


> For "special stuff", a one-off rsync might cope better, but that
> handling might come with a performance hit (that's conjecture - I've not
> proof or experience in performance).


Weeellll... I don't know. Which is why I'm asking. Especially as I would
like to finish this this evening.

It used to be the recommendation to do a:

tar -c -C /wherever source | tar -x -C /wherever/dest


I would hope that rsync is a little more elaborate to give /better/
performance than the more minimal cp...

One of those infrequent things for a good compare of many ways?


?

Cheers,
Martin



> On 24 May 2013 16:07, "Martin" wrote:
> 
>     Folks,
> 
>     OK, so I'm doing an upgrade and have a lot of data to copy between disks
>     to go from ReiserFS and ext4 to all go onto btrfs.
> 
>     What's the latest opinion/advice/ideas as to what command to use to
>     do that?
> 
>     Mount the disks and just naively go:
> 
>     cp -av /mnt/source /mnt/dest
> 
>     ?
> 
> 
>     Anything 'better' or faster?
> 
>     Cheers,
>     Martin
> 
>     --
>     - ------------------ - ----------------------------------------
>     -    Martin Lomas    - OpenPGP (GPG/PGP) Public Key: 0xCEE1D3B7
>     - martin @ ml1 co uk - Import from   hkp://subkeys.pgp.net
>     <http://subkeys.pgp.net>   or
>     - ------------------ - http:// ml1 .co .uk/martin_ml1_co_uk.gpg


-- 
- ------------------ - ----------------------------------------
-    Martin Lomas    - OpenPGP (GPG/PGP) Public Key: 0xCEE1D3B7
- martin @ ml1 co uk - Import from   hkp://subkeys.pgp.net   or
- ------------------ - http:// ml1 .co .uk/martin_ml1_co_uk.gpg



More information about the Nottingham mailing list