LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Whole system backup and restoration (http://www.linuxquestions.org/questions/linux-newbie-8/whole-system-backup-and-restoration-481149/)

newbie_adm 09-07-2006 01:42 AM

Whole system backup and restoration
 
I'm really new to linux. I wanted to backup my whole suse9 system. Is there some books or other specical commands to do this one? I have also to learn how to restore suse 9 from the backup copy. Please help.

Thanks

Best regards,
newbie_adm

routers 09-07-2006 05:55 AM

i only use tar to backup and so far testing restore no problem occured with my backup , but i dont know if later someone might suggest good backup for you and for using tar this is the way
i use

1) Backup to USB disk for my FC4 system

Code:

# cd /
# tar -cvjf /media/usbdisk/FC4-NC.hda6.tar.bz2 --exclude proc --exclude export --exclude dev --exclude media  /

cheers

bigrigdriver 09-07-2006 07:11 AM

Dar is a good backup tool. The TUTORIAL has step by step instructions for making backups, listing the backup, and restoring (whole or partial).

There is also a GUI frontend for Dar, called Kdar.

binladen 09-14-2006 12:03 AM

Quote:

Originally Posted by routers
i only use tar to backup and so far testing restore no problem occured with my backup , but i dont know if later someone might suggest good backup for you and for using tar this is the way
i use

1) Backup to USB disk for my FC4 system

Code:

# cd /
# tar -cvjf /media/usbdisk/FC4-NC.hda6.tar.bz2 --exclude proc --exclude export --exclude dev --exclude media  /

cheers

tar has so many versions, I wonder if your backup picks up:
/usr/source/kernels/<more directories>/
.../acpi/sleep/proc/...,
.../cpu/freq/proc/...,
.../keys/debug/proc..., and so on

There is usually a lot of stuff under
.../include/media/... as well.

Example full path:
/usr/src/kernels/2.6.9-34.EL-i686/include/config/acpi/sleep/proc

If u have a non-restored system might wanna chk & c

dwcoffin 09-15-2006 12:46 PM

Full OS Backup/Restore of RHEL4 from TAR
 
This is my first post and I, too, would like some help with performing a full backup/restore. I am running RHEL4 on 2 identical boxes (1 Production, and 1 Development). I'd like to practice performing a baremetal restore of the Production to the Development box.

My basic understanding is that if I perform a proper backup using DD of the PROD box, then I can perform a basic install of the RHEL4 OS on the DEV box and then perform a restore of the TAR from PROD on it, and DEV should come up identical to the PROD box.

Any good hints, links, tutorials, or books to reference would be most helpful.

This looks like a really great site and hope to learn much soon!

Thanks for any help you may provide.


DWCOFFIN

routers 09-16-2006 02:58 PM

OMG!! two another question come to the newbie_adm question
BTW for info , what i have done restore to another
computer the system is up but then
once up i will update new kernel on the spot

so there me no need to think for, wheater its copy all the folder/files
inside the kernel

binladen 09-19-2006 11:25 AM

Be careful, because users create whatever directories they want to. Im a developer, and have several 'dev' directories of my own, and a few 'proc' as well, and my mp3 collection is part of my own 'media' directory tree.

Arbitrary kernel updates introduce variables into the development process that may not be appreciated by everybody.

One of my many wives is from malaysia, but Im sure the American forces have a trap waiting there for me. So, I spend all my time in this bunker writing Linux code.
It rocks, bro.

dwcoffin 01-09-2007 10:30 AM

Newbie use of dd
 
Well, it's been 4 months since my original post about full backups/imaging and restoring. No responses, so I thought I would update here what I've learned in hopes of helping others.

1.) I found a great site here on LinuxQuestions.org Just do a search forums with "Learn the DD Command Revised".

I setup a Linux environment by downloading some VM Appliances. I attached another Hard Drive to the Linux VM and performed a DD from /dev/sda to /dev/sdb. Then removed /dev/sda and booted /dev/sdb as /dev/sda. It booted up exactly.

The command I used was:

dd if=/dev/sda of=/dev/sdb

2.) I then wanted to see how to create the image of /dev/sda to a file. So, I found another link that gave me a good example of this at:
http://www.debianhelp.co.uk/ddcommand.htm

So, I again used my Linux VM with 2 internal drives [/dev/sda(8GB) and /dev/sdb(8GB)]. I did a fdisk on the /dev/sdb drive and created 1 partion with the file system ext3. On the /dev/sdb1 partition I created a folder called backup which is where I wanted the image file to be written.

The command I ran was:

dd if=/dev/sda | gzip > /mnt/sdb1/backup/sda.gz

The command wrote the sda.gz file in about 13 minutes. Of course this is all logical, since it's a VM, but the source disk had 2.3GB of data, the file was 1GB in size. Not a bad compression ration!

3.) That's all fine and good, but the proof is in the pudding, so to restore it. I didn't want to risk destroying my /dev/sda disk so I attached another 8GB drive as /dev/sdc. I did nothing as far as fdisk to create partition(s) on this drive.

To restore the file to the /dev/sdc drive I ran the following command:

gzip -dc /mnt/sdb1/backup/sda.gz | dd of=/dev/sdc

After another 13 minutes it was restored. To prove it was good. I shut down the Linux VM, removed the /dev/sda and /dev/sdb drives and booted the /dev/sdc as /dev/sda. It came up perfectly!

I'm really pleased by the results and hope this helps someone else. Next on the list is to try and run this DD command and copy the image over the network using 'netcat' or some other network shell command.

All further posts will be made in a more appropriate forum, but wanted to close out my request with some information.


All times are GMT -5. The time now is 03:54 PM.