LinuxQuestions.org
Review your favorite Linux distribution.
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 02-08-2008, 09:15 AM   #1
nyle
Member
 
Registered: Feb 2008
Location: Atlanta
Distribution: Ubuntu 9.10
Posts: 42

Rep: Reputation: 17
Question re: dumping to new hard drive


Hello,

I need to do a full backup of my 250GB /dev/hdb. The target drive is a brand new 300GB external drive (/dev/hdd).

- Do I need to format the new drive in some particular fashion before I can backup data to it?

- Do I need to match the partition table of the source drive or anything, or will one standard Linux partition of 300GB be sufficient?

- What exactly does dump store on the target drive? Is it just a single massive file you pick apart using restore, or does it just copy the directory structure and files as they are?

Thanks

Last edited by nyle; 02-08-2008 at 09:15 AM. Reason: dump formatting drive
 
Old 02-08-2008, 09:43 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
The most efficient way to do this is to tar and compress whole directories into single files which you simply copy to the new drive.

eg:
tar -czvf archivename directoryname
creates a .tar.gz compressed archive with the contents of directoryname.

On the new drive, first create one or more partitions using fdisk or cfdisk, then create the filesystem using mkfs

(If you were referring to a command called "dump", I know nothing of that)
 
Old 02-08-2008, 10:18 AM   #3
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 117Reputation: 117
If you just want to back up the drive, format it with the same filesystem as the source and use rsync to synchronize them. With rsync, updates will complete much faster than with tar, as it only transfers the changes.
 
Old 02-08-2008, 10:42 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Matir is right (I assume). I've not yet learned rsync, and tend to do things manually.

Does rsync do compression?
 
Old 02-08-2008, 11:32 AM   #5
xiao_haozi
LQ Newbie
 
Registered: Feb 2008
Location: Philadelphia, PA
Distribution: Slackware, Kubuntu, BackTrack, Slax, LFS
Posts: 10

Rep: Reputation: 0
Could also try using cp -auv once you have partitioned the new drive and use that to transfer over your important information.
Or "dd" to do it all.
 
Old 02-08-2008, 11:33 AM   #6
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 117Reputation: 117
rsync can do compression. That the -z option. But that's only compression when in-transfer, so it's only really useful to a remote machine (oh yes, rsync works over ssh as well ). The idea is that the two disks will be identical at the end.
 
Old 02-08-2008, 12:08 PM   #7
nyle
Member
 
Registered: Feb 2008
Location: Atlanta
Distribution: Ubuntu 9.10
Posts: 42

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by Matir View Post
If you just want to back up the drive, format it with the same filesystem as the source and use rsync to synchronize them. With rsync, updates will complete much faster than with tar, as it only transfers the changes.
rsync is definitely a plausible solution, but here is another question:

/dev/hdb consists of several partitions: /hdb1, /hdb2, /hdb3, /hdb5, and /hdb6. In order to use rsync in this manner, do I have to create partitions of identical size on my external drive?
 
Old 02-08-2008, 12:14 PM   #8
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 117Reputation: 117
No, rsync operates at the file-system level. I backup my /home and several other partitions to the same filesystem on an external drive on my computer.
 
Old 02-08-2008, 12:47 PM   #9
nyle
Member
 
Registered: Feb 2008
Location: Atlanta
Distribution: Ubuntu 9.10
Posts: 42

Original Poster
Rep: Reputation: 17
I'll give that a shot, thanks!
 
Old 02-08-2008, 09:03 PM   #10
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 57
you could just clone it with the dd command
 
  


Reply

Tags
drive, dump, formatting


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
Novell is dumping KDE, so I'll be dumping SuSE KimVette Suse/Novell 10 11-12-2005 08:09 PM
2 hard drive question cabrando MEPIS 3 11-02-2005 03:43 PM
hard drive question Joey.Dale Linux - Hardware 1 09-01-2003 11:42 AM
hard drive question wr3ck3d Linux - Hardware 2 03-14-2003 02:54 PM
hard drive question kylo8787 Linux - General 2 03-01-2002 03:51 AM


All times are GMT -5. The time now is 09:34 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration