LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 03-17-2006, 03:00 AM   #1
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Rep: Reputation: 30
backup the whole drive


hi all,

How to make backup for the whole drive into a tape/other drive with the same size or not?
 
Old 03-17-2006, 04:39 AM   #2
pcweirdo
Member
 
Registered: Oct 2004
Location: Melbourne-ish, Australia
Distribution: Gentoo, Windows XP Pro
Posts: 58

Rep: Reputation: 15
Hey guy,

You could use
$ cp -ruva / /mnt/backup
where /mnt/backup is some kind of backup media like a Samba share on another computer or another hard drive. BUT you'd have to read the cp man page and make sure you exclude the /mnt/backup from the copy. Come to think of it, this first approach is a bad idea.

You might also try
$ dd if=/dev/hda1 of=/mnt/backup/hda1.backup
with some more options as per the dd man page. Like maybe bs=something or bc=something etc. Repeat for each partition. (Maybe see /etc/fstab or /etc/mtab for a list of partitions)
This way, you are copying the hard drive bit-for-bit, which avoids copying shit like /proc and /dev. You'll also preserve your partitioning, for example if you've put /usr on a separate partition to /var or /pron. You will receive a file for each partition, and you can put that back on a partition with:
$ dd if=/mnt/backup/hda1.backup of=/dev/hda1
You might want to read some man pages because I think those commands might trash your disk if you mix up input and output.

If you have a second hard drive the same size as the one with your important data on it, you can do
$dd if=/dev/hda1 of=/dev/hda2
or something like that, to duplicate the partition in its entirety.

You can also use hda rather than hda1 to backup the entire hard drive including the boot sector and crap. That might actually be a better idea. Also note that your hard drives might be sda, sdb or hd36dd, although I doubt your hard drive has breasts that big.

I have never used a tape drive.
-pcweirdo.
 
Old 03-17-2006, 05:46 AM   #3
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Original Poster
Rep: Reputation: 30
thanks pcwierdo. actually, I want to do something like a mirror of two disk but not RAID. I just want to have two identical content of hard drives. any other app that could speed up the process beside dd?
 
Old 03-17-2006, 11:09 AM   #4
pcweirdo
Member
 
Registered: Oct 2004
Location: Melbourne-ish, Australia
Distribution: Gentoo, Windows XP Pro
Posts: 58

Rep: Reputation: 15
Why don't you want RAID? You can get software RAID these days. As far as I can tell, any system which would give you two copies of your hard drive would fall under the broad modern meaning of "RAID".

And dd will go as fast as your hardware allows. Shell scripts and cron can be used to automate it to backup once a day or whenever, but this is not as good as RAID. dd is more useful for once-off or irregular backups.

-pcweirdo.
 
Old 03-17-2006, 02:33 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Quote:
Originally Posted by zamri
thanks pcwierdo. actually, I want to do something like a mirror of two disk but not RAID. I just want to have two identical content of hard drives. any other app that could speed up the process beside dd?
I think this is what rsync is intended to do.

--- rod.
 
Old 03-18-2006, 08:16 PM   #6
pcweirdo
Member
 
Registered: Oct 2004
Location: Melbourne-ish, Australia
Distribution: Gentoo, Windows XP Pro
Posts: 58

Rep: Reputation: 15
Yep, rsync is definitely a good tool to use.

I've never used it but maybe it's user-friendly
http://rsync.samba.org/
http://rsync.samba.org/examples.html - Wow, personal backups already! Yay! And even the example with a backup hard drive! Yay yay yay yay! I love rsync now!

This could be handy
http://everythinglinux.org/rsync/

-pcweirdo.
 
Old 03-27-2006, 11:17 AM   #7
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Original Poster
Rep: Reputation: 30
rsync? hmmm. i think it is good for backup through network. Yeah. that's good. thanks.
 
  


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
Backup to tape drive kwtan Linux - Software 1 01-11-2006 10:11 PM
using linux cd to backup xp drive babag Linux - General 2 12-23-2005 08:26 PM
Hard Drive Backup Boffy Linux - Software 4 10-19-2004 01:38 PM
cannot backup to tape drive complus Linux - Newbie 5 10-01-2003 05:17 AM
Backup Boot drive question... Spec Linux - General 5 09-17-2002 09:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 07:43 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