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

Peter Stokes peter at ashlyn.co.uk
Tue May 28 07:00:42 UTC 2013


Hi

Sorry coming in on this late on and do not have earlier mails, so excuse any repetition.

If I am copying a filesystem on a specific partition to another I generally use dump/restore (I am mainly on Solaris, so ufsdump/ufsrestore for UFS), as ever the filesystem must not be changing to be effective.

Alternatively, especially if dump is not supported on the filesystem, I would tend to use tar (gnu tar on both Solaris and Linux).

eg if I wanted to move a filesystem from /originalfilesystem to /newfilesystem I would use (user root to not get any permission issues etc)

cd /originalfilesystem
tar cf - ./* |(cd /newfilesystem;tar xf -)

I always find cp really slow and never get the flags correct. It is great for one/small number of file copies.

Hope that helps

Peter

---------------------------
Peter Stokes
Tel: 01636 627990
Mbl: 07977 532320
---------------------------




On 25 May 2013, at 15:25, Mike Martin <mike at redtux.org.uk> wrote:

> Personally I generally tar up things when I do a transfer, seems to work well
> 
> 
> On 24 May 2013 17:50, Andy Smith <andy at strugglers.net> wrote:
> Hi Martin,
> 
> On Fri, May 24, 2013 at 05:47:39PM +0100, Martin wrote:
> > 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...
> 
> No, cp -a includes all that. Check the man page. :)
> 
> Cheers,
> Andy
> 
> --
> http://bitfolk.com/ -- No-nonsense VPS hosting
> 
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham
> 
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham




More information about the Nottingham mailing list