LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cloning hard drive is stressing me out! I need advice (https://www.linuxquestions.org/questions/linux-newbie-8/cloning-hard-drive-is-stressing-me-out-i-need-advice-879575/)

pasqualebaldi 05-09-2011 12:33 AM

Cloning hard drive is stressing me out! I need advice
 
I have never used rsync before, only DD. But from what I have been reading, rsync is better becasue it will basically mirror your hard drive, thus being able to run the cloned software from the new hard drive.

My problem is I do not know what is the best commands or even the basic commands to use in rsync. I am trying to make an image from a external hard drive to a usb drive. That way my chances of messing up he original software is not as risky becasue I'll just restore the image onto another hard drive.

Does anyone know the best script to have rsync make an image file of a hard drive and place it on a usb drive and then restore it?

any advice would be appreciated

Thank you

EricTRA 05-09-2011 12:54 AM

Hello,

If I understand you correct you want to make an image of your harddisk to have a backup, right? Rsync is very confusing in my opinion and not my favorite for that kind of job. I imagine you want to compress what you backup into the image in order to be able to put it on a USB drive. Have a look at CloneZilla, that would be a lot easier I think.

Kind regards,

Eric

pasqualebaldi 05-09-2011 01:18 AM

Quote:

Originally Posted by EricTRA (Post 4350557)
Have a look at CloneZilla, that would be a lot easier I think.


Eric

I agree, it is confusing, but i think it will do what i need. i have tried clonzilla, and it copies the files to another hard drive, but the software will not boot on the new hard drive. i have also tried ghost4linux and DD.

I just don't know how to make one hard drive to be an EXACT copy of the original to run the software.

EricTRA 05-09-2011 01:28 AM

Hi,

I'm sorry, I understood you wrong. I thought you would use it for backup but it seems you just want an exact copy of your drive. I think dd should do the job. I've only used it on a few occasions and it always worked flawless. Have a look at this site for some pointers and examples.

Kind regards,

Eric

mikeb380 05-09-2011 01:46 AM

To clone HD with Clonezilla
 
Quote:

Originally Posted by pasqualebaldi (Post 4350543)
I am trying to make an image from a external hard drive to a usb drive. That way my chances of messing up he original software is not as risky becasue I'll just restore the image onto another hard drive.

Thank you

Pasquale, I have just had the same problem. I had to move my data, et al, from a 40 gig HD to a new 500 gig drive. I used clonezilla and it is beautiful. I first did a backup to my USB drive, then I cloned the old to the new drive, again using Clonezilla. If you use it, be sure to get the Quick Reference Card & read it thoroughly! It has step by step how to do a CLONE of your old drive. You can move from a small drive to a larger one after using Gparted to partition the new drive the way you want it. Again, RTFI!!! RTFI!! I can't emphasize enough, RTFI!! do it several times before doing anything with the drives. I promise it works like a charm.
Michael

schneidz 05-09-2011 08:09 AM

Code:

dd /dev/sdx /dev/sdy
# should be smaller drive to larger drive
# upon reboot use a live-usb with gparted on it to resize the drive.

jv2112 05-09-2011 08:10 PM

http://rsync.samba.org/documentation.html

:twocents:

I have a basic script (scheduled as a cron job daily) that backs up my primary drives to a back up drive daily. You can even combine with SSH to do across a network. So I always have a current copy. After a little reading you may find rsync is a very handy tool.



Quote:

Basic syntax.

rsync -av -t --delete /path/to source/ /path/to destination

-a : Archive
-v : verbose

-t by timestamp of files

--delete : erases files on destination that is not on the source.


Hope this helps.

EDDY1 05-09-2011 08:25 PM

Quote:

I agree, it is confusing, but i think it will do what i need. i have tried clonzilla, and it copies the files to another hard drive, but the software will not boot on the new hard drive. i have also tried ghost4linux and DD.
I have to say clonezilla works very well for me.

I have cloned disks with it and they boot.
I have retored an image to a different disk & it boots.
The 1 thing I haven't tried is restoring a partition to another disk on a different partition #.
Clonezilla does create a bootable OS.

Another note, to clone or image to usb drive in clonezilla, you can't plug in usb drive until prompted to.
It says plug in device wait 5 seconds, press enter.

mrrangerman 05-09-2011 10:55 PM

Boot to a live-cd, check drive listing with the fdisk -l command, and copy your drive when the drives are not mounted. Where hda and hdb are, you will change to what your drives are listed with fdisk -l.

Code:

dd if=/dev/hda of=/dev/hdb bs=32256
I have copied many smaller drives to a larger drive with dd. When all is complete I then use G-parted to expand the partition of the new drive.


All times are GMT -5. The time now is 03:04 AM.