LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-09-2011, 12:33 AM   #1
pasqualebaldi
LQ Newbie
 
Registered: May 2011
Posts: 5

Rep: Reputation: 0
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
 
Old 05-09-2011, 12:54 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
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
 
Old 05-09-2011, 01:18 AM   #3
pasqualebaldi
LQ Newbie
 
Registered: May 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by EricTRA View Post
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.
 
Old 05-09-2011, 01:28 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
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
 
Old 05-09-2011, 01:46 AM   #5
mikeb380
LQ Newbie
 
Registered: Apr 2011
Location: SC
Distribution: ubuntu 10.10 trying 11.04 & kbuntu 10.10
Posts: 25

Rep: Reputation: 1
Talking To clone HD with Clonezilla

Quote:
Originally Posted by pasqualebaldi View Post
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
 
Old 05-09-2011, 08:09 AM   #6
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
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.
 
Old 05-09-2011, 08:10 PM   #7
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 106Reputation: 106
http://rsync.samba.org/documentation.html



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.
 
Old 05-09-2011, 08:25 PM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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.

Last edited by EDDY1; 05-09-2011 at 08:31 PM.
 
1 members found this post helpful.
Old 05-09-2011, 10:55 PM   #9
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 59
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cloning a hard drive alphisb0t Linux - Software 9 08-05-2010 08:18 AM
Cloning Hard Drive FredGSanford Linux - Software 5 08-28-2008 05:37 AM
cloning drive but need advice peterb Linux - Newbie 11 10-15-2007 01:18 PM
Cloning a hard drive! Shioni Linux - General 6 03-19-2006 11:39 AM
Cloning Hard Drive rls Linux - Software 3 08-23-2003 02:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration