Re: [F8] Need help with tar or how to copy root to new drive?

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

 



Daniel B. Thurman wrote:
I am having a hard time simply trying to copy my root partition to a new
drive and somehow tar is not doing what I expected. Can someone advise
me how to do it correctly?

I tried:

1) mkdir /mnt/new
2) mount /dev/sdc3 /mnt/new
3) cd /mnt/new
4) (cd /; tar --one-file-system --xattrs -cf - .) | tar --one-file-system --xattrs -tvf -)
   [result: All mounted filesystems are copied over]  Drat!

I think you have a typo somewhere. The --one-file-system option should keep tar from traversing mount points (and your -tvf option isn't going to copy anything...)

The only other possibility that comes to my mind is to mount the root drive
to /mnt/root read-only. mount the new drive to /mnt/new, and then tar-copy
but this may have consequences with the currently mounted root filesystem?

If your drives are identical you can boot the install media with 'linux rescue' at the boot prompt, then use dd to copy the raw disk image.

cp -a or rsync should work as well as tar for a file oriented copy, and both have --one-file-system options.

--
  Les Mikesell
    lesmikesell@xxxxxxxxx


--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux