How copy /usr contents to a new partition?

Angus MacGyver macgyver at calibre-solutions.co.uk
Sat Jan 14 12:33:50 UTC 2006


On Fri, Jan 13, 2006 at 11:09:09AM -0600, john bray wrote:
> On Fri, 2006-01-13 at 06:52 -0700, STYMA, ROBERT E (ROBERT) wrote:
> > > 
> > > I want to copy /usr to a new partition and then attach that 
> > > at /usr. I  
> > > issued a command
> > > 
> > > 	cp -options(recursive included) /usr /mnt/"mountpoint
> > > 
> > I often use the following syntax to copy directory structures and
> > preserve permissions, dates, soft links, etc.
> > 
> > intially name /mnt/"mountpoint  /mnt/usr
> > 
> > (cd /;tar cf - usr) | (cd /mnt; tar xf - ) 
> > 
> > After that you can name the mountpoint whatever you want.
> > 
> > Bob Styma
> > 
> > 
> 
> heheh...one of the wonderful things about *x is that we can do it so
> many ways.  my favorite is:
> cd /usr
> find . -print | cpio -dump /mnt/<yourmountpoint>

Quite :-)
        
Mine...
        
cd /mnt/newusr
dump -0af - /usr | restore -xf - ./ 
        
        
Prefereably in single user mode, as things then won't be active, though at  least dump should know how to handle open files.


--
I ain't perfect, yet.. 
MacGyver
         




More information about the fedora-list mailing list