Re: restoring FC1 to *new* partition from tar archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 08, 2004 at 03:37:46PM -0400, Joe(theWordy)Philbrook wrote:
> 
> Hi I've just had to relocate my FC1 to a different partition. I used
> tar...  And I'm hoping I did this well enough for it to survive when I
> eventually use anaconda to upgrade to FC2.
> 
> Would someone tell me if I did this right?  I've usually only done this
> kind of thing with partimage. But not all of my partitions are the same
> exact size so I thought I'd learn to use tar.
> 
> I was concerned about files being updated during the tar -czf process
> however, so I booted my mdk9.1 partition, and used mkfs on the new FC1
> partition to ensure a clean ext2 file system. Then I and mounted the old
> and new FC1 partitions.
> 
> next I did a cd to the old FC1's mount point and:
> 
> # tar -czf /archivepath/tarfilename.tgz .

I use tar czsSpf dest.tar.gz *

And then extract with tar xzsSpf --numeric-owner dest.tar.gz

> Tar said it was skipping some sockets, which I wasn't sure about, but all
> of them were in /tmp so I figured they couldn't be that important...

Sockets are only inodes and can be created only with bind(2). Don't worry
about them

> Then I did a cd to the new FC1 mount point and:
> 
> # tar -xpzf /archivepath/tarfilename.tgz .

You could have done it in one single pass:

tar csSpf - * | (cd /newpart && tar xzsSpf - --numeric-owner)

or: cp -a /old /new

Running without -p and --numeric-owner could cause some problems:
-p: preserves permissions. Without this, the permissions of extracted
    files will be affected by the value of umask.
--numeric-owner: if you had created the tar.gz under FC1 and extracted it
under MDK, different values for same users in /etc/passwd could cause
problems. As you made the tar and extracted it under FC1, you shouldn't
worry about this one.

Regards,
Luciano Rocha



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux