[Gllug] DD Ext3 Move

Nix nix at esperi.org.uk
Wed Feb 8 17:37:57 UTC 2006


On Wed, 08 Feb 2006, Tethys uttered the following:
> 
> "t.clarke" writes:
> 
>>1) tar does not, i think, preserve certain kinds of files within in a file
>>   system properly,  and therefore cpio is preferred for back-up/restore of
>>   root filesystems.
> 
> Traditionally, that was true. However, GNU tar has handled them for well
> over a decade now, and so there's no longer any reason to use cpio. Unless
> the filesystem is full, this will also be quicker than using dd.

Indeed. cpio's sole advantage is that the file format is less yukky than
tar's, but the *command* is so hideous (as is the way it indicates the
end of the archive, a `file' named TRAILER!!!, which is of course a
valid filename!) that I never use cpio for anything if I can help it.

I used to move filesystems around via a pair of tars to and from stdout
connected via ssh, but for my most recent major move I just used `cp
-av' as root.

It worked flawlessly. The only knotty place might have been copying
/dev, but I use udev so have no need to copy /dev at all. If you have
xattr support in your coreutils, it should move SELinux-labelled stuff
around perfectly well as well (and if you'reusing SELinux you almost
certainly *do* have xattr support in your coreutils!)

-- 
`... follow the bouncing internment camps.' --- Peter da Silva
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list