On Fri, 2007-06-08 at 17:48 +0200, Alan McKinnon wrote:
> On Friday 08 June 2007, Hemmann, Volker Armin wrote:
> > On Freitag, 8. Juni 2007, Aleksey Kunitskiy wrote:
> > > Hi all,
> > >
> > > Is it safe to move my linux system by using:
> > > #>cp -rp /mnt/old_part /mnt/new_part
> > > and approriate changes in grub.conf/fstab on new system location ?
> >
> > nope.
> >
> > cp -a if you really want to use copy. But doesn't kill that the
> > ctime/mtime making uninstalling things a pain?
> 
> No.
> 
> cp -a is equivalent to cp -dpPR
> 
> and from the man page:
> 
> -p     same as --preserve=mode,ownership,timestamps
> 
> What the OP *will* have a problem with a copying /proc, /dev, /sys and 
> other virtual filesystems. When I do this trick, I usually dd or tar or 
> cp -a entire filesystems and then copy / with this trick:
> 
> mount -o bind / /some/tmp/dir
> cp -a /some/tmp/dir /some/other/dir
> 
> This ensures that only files actually on-disk are copied
> 
> alan
> 
> 
> -- 
> Optimists say the glass is half full,
> Pessimists say the glass is half empty,
> Developers say wtf is the glass twice as big as it needs to be?
> 
> Alan McKinnon
> alan at linuxholdings dot co dot za
> +27 82, double three seven, one nine three five

I generally prefer to do this with dd, from a remote environment

dd if=/dev/<source partition> of=/dev/<destination partition>

Tim Allingham
tim -at- datafirst-it.com.au

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to