Re: rsync or dd to clone a hard drive?

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

 



On 10/06/2010 10:58 AM, Maxime Alarie wrote:
> I have never used dd to clone a hard disk. 
> 
>  
> 
> I use rsync for a lot of   my backups , and I was wondering what would
> be the best tool to clone a  disk.  I don’t want 3^rd party software
> also.  I want built in command  line tools.

I use tar to migrate date from 1 drive to another.  It can copy
permissions and owners. For a short period, it did not copy context, but
now it can.  It will copy directory structures intact and copies links
and symlinks as is (by default).

tar --xattrs --selinux --one-file-system -cf - /dir | (cd /new/path; tar
-xf -)

should do the job as root user.  You can even add the -S option to
handle sparse file efficiently.

> I know rsync will resync where it left off if I encounter a problem,
> what about dd?  Do I  absolutely have to creat an image before cloning? 
> Ex: dd if=/dev/sda of=sda.img   or I can use dd if=/dev/sda of=/dev/sdb?

tar can be told to not overwrite old files (-k), but you probably *want*
to overwrite the incomplete file where it previously died.

> Thanks.

-- 
Kevin J. Cummings
kjchome@xxxxxxx
cummings@xxxxxxxxxxxxxxxxxx
cummings@xxxxxxxxxxxxxxxxxxxxxxx
Registered Linux User #1232 (http://counter.li.org)
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux