LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-12-2012, 08:29 PM   #1
jaredR
Member
 
Registered: Apr 2005
Location: New Mexico
Distribution: Fedora 14 32 bit sys
Posts: 32

Rep: Reputation: 1
Copy main hard drive to backup hard drive


I know this is really remedial but I have not done this in ten years or more. I am running a Fedora 14, 32 bit system. I want to copy the entire contents of my main/every day usage hard drive, to an exact same size/brand hard drive already installed on the same machine. I know my hardware is "retro" and plan to build a new 64 bit system (sooner than later I hope). But until I get that project together I want to have everything including the op sys on a second backup hard drive. I am a bit confused about "dump" vrs "copy" and would appreciate if you could point me to a simplistic step by step tutorial. As I am and old guy with 6yr and 4yr old sons I need something I can print out and follow as constant distraction often leads me astray when trying to rely on my memory most of the time.
Thanks much for your time. JRS (grumpy old guy)
 
Old 12-12-2012, 08:43 PM   #2
lucmove
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian Jessie
Posts: 715

Rep: Reputation: 72
See if this recent thread is useful:

http://www.linuxquestions.org/questi....php?p=4848138
 
Old 12-12-2012, 09:35 PM   #3
Inkit
Member
 
Registered: Feb 2011
Location: India
Distribution: Mint 10
Posts: 142

Rep: Reputation: 15
You should have dejadup backup software already installed, and you can use it to take a backup. In fact, you can even configure a day and time to take a backup so that even if you forget to, it'll automatically backup your data.
Or you could use rsync to backup your files. It's a command line tool but is very easy to use, meaning that if I could learn to use it, anyone can.
 
Old 12-12-2012, 11:16 PM   #4
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,614

Rep: Reputation: 433Reputation: 433Reputation: 433Reputation: 433Reputation: 433
Hi Jared,

Quote:
I want to copy the entire contents of my main/every day usage hard drive, to an exact same size/brand hard drive already installed on the same machine.
You can attain this through either of the two simple means: using, "dd" or using "rsync".

Using 'dd'--do this as root:

1. As the two drives are already running in the same machine both should be seen already when the system is running. To check this--

Code:
fdisk -l
You should be able to identify which is the old and the new drive. The old drive presumably is the one used by the system so you can only consult the running system's fstab--

Code:
cat /etc/fstab
see if an /dev/sda (or /dev/hda) is the one used in the running system, so this is the one you should copy to the other one (assuming the new one is called /dev/sdc or /dev/hdc whatever name is used).

After ascertaining which is the old and the new you have need first to ascertain if their partitions are geometrically equal (some systems use different partitions for mounting different system directories like /tmp, /var, or /boot, both disks need to be identical in sequence and size if you want the second copy to be like and exact image, 'parted -l' is more informative than 'fdisk -l' so:

Code:
parted -l /dev/sda (or /dev/hda) <press Ctl+C to exit> parted -l /dev/sdc (or /dev/sdc) <press Ctl+C to exit>
Note down the sequence of partitions. If they differ you still have time to correct the terrain (geometry) of the new disk to match to the old by using Gparted a gui partitioner. Note also to mark (FLAG) the bootable partition in the new disk to be same with the partition number as in the old disk --so that you can even boot from the copy disk.

Use paper and pen to note down the disks. If you mistake dd for writing the new disk into the old consequence is you delete all data from the old drive and writing it empty. 'dd' is very powerful tool and very stupid at that: it does whatever you tell it to do, no questions asked, no complaint.

Having both disks identical more or less you may now copy the old disk to the new disk:

Code:
dd if=/dev/sda of=/dev/sdc bs=2048
(get a cup of coffee and newspaper to let alone the computer and finish the work).

That command copies not only the folders but the MBR as well of the old. When copying succeeds, you may set the Bios to boot to the copied drive and you can boot into it as much as you have booted into the old drive.

You may highlight this portion right click copy and paste into text editor and print for handy guide.

---------x

Using "rsync"--do this as root:

You will treat the two (source and destination) as folders, not as disks, unlike 'dd'.

Boot from the old disk and mount the new disk:

Code:
mkdir /mnt/newdisk mount -o rw /dev/sdc /mnt/newdisk
Now copy everything, files and folders, from the old disk to the new disk:

Code:
rysnc -v -r -l / /mnt/newdisk --perms
(get a cup of coffee and newspaper, let alone the computer to finish the work).

The copied files/dirs on the new disk are exact copies of the old but the new disk is not bootable until reconfigured to boot.

You may highlight, Copy and Paste this portion into an editor and print for handy guide.

-----x

Quote:
I know my hardware is "retro" and plan to build a new 64 bit system (sooner than later I hope).
I don't know what is retro.


Quote:
But until I get that project together I want to have everything including the op sys on a second backup hard drive. I am a bit confused about "dump" vrs "copy" and would appreciate if you could point me to a simplistic step by step tutorial. As I am and old guy with 6yr and 4yr old sons I need something I can print out and follow as constant distraction often leads me astray when trying to rely on my memory most of the time.
The methods I pointed above are the most simple, more reliable than "copy and paste", and fitting to your objective. There is no need to use backup utilities for these types of witchcrafts still use the same commands as given above. Your fingers and certainly more reliable than other men's concoctions.

Hope that helps.

Good luck.
 
2 members found this post helpful.
Old 12-13-2012, 08:52 PM   #5
jaredR
Member
 
Registered: Apr 2005
Location: New Mexico
Distribution: Fedora 14 32 bit sys
Posts: 32

Original Poster
Rep: Reputation: 1
Dear malekmustaq
Thanks much for the step by step instructions. I am not terribly creative with computers but I follow directions well. Thanks very much again.
btw 'retro' means anything reminiscent of the past, Legacy hardware, out of date tech etc. In my case all my hardware supports 32 bit only and many of the games my kids want to play work best with 64 bit technology.
I will be 70 yrs old in a few short weeks and even though I am healthy I still think of my self as a bit retro now and then. Grumpy old guy
 
Old 12-14-2012, 12:34 AM   #6
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,614

Rep: Reputation: 433Reputation: 433Reputation: 433Reputation: 433Reputation: 433
Quote:
btw 'retro' means anything reminiscent of the past, Legacy hardware, out of date tech etc.
Ah yes, just as I have tried to infer in the mind, but was unsure. Thanks for clarifying.


Quote:
In my case all my hardware supports 32 bit only and many of the games my kids want to play work best with 64 bit technology.
Yea but 32bit is still okay: after all its just a game. I always try to be simple in my case also, as possible. 64bit becomes a MUST only when things go awry in 32bit .

Quote:
I will be 70 yrs old in a few short weeks and even though I am healthy I still think of my self as a bit retro now and then. Grumpy old guy
Happy Birthday! in advance though.

Look what number of days hath The Most High blessed thee. In your childhood you must have done something good.....

Good luck.

Be sure to frequent here and share to others your Gnu/Linux experience.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
I want to copy my hard drive to a larger hard drive and boot from the new drive. lpmorgan1 Ubuntu 8 09-08-2009 12:26 AM
Copy an internal hard drive as backup? Restore an internal drive? Peufelon Linux - Hardware 2 06-15-2008 04:28 PM
Copy Fedora 5 Hard Drive to another Hard Drive Using Knoppix 5.1.1 lud477 Linux - Software 2 03-17-2007 06:06 PM
How to copy ext2fs from failed hard drive to good drive? DogWalker Linux - Hardware 2 08-30-2004 11:52 PM
STUCK--Trying to copy old Hard Drive to new Hard Drive. Please Help tsw Linux - Newbie 8 05-26-2004 03:47 AM


All times are GMT -5. The time now is 06:33 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration