Operating System - Linux
1822456 Members
2317 Online
109642 Solutions
New Discussion юеВ

Re: Backup of linux server

 
nasmel
Frequent Advisor

Backup of linux server


Hello...

I have four RHEL 4.0 servers and oracle is running on that.Am configured another windows server as backup server using symantec backup exec and started to take the back up of oracle database using remote agents for linux.
Now i want to take the back up of linux servers (I mean OS backup).how can i do that.

using symantec backup exec i can take the backup of "/" ,but am not sure whether it will be successfull while restoring and i cant restore the server from backup in case of system crash...

Is there any other way to take the backup of linux servers and to restore it directly from media..
5 REPLIES 5
Zeev Schultz
Honored Contributor

Re: Backup of linux server

Well,there are commercial tools like Symantec Ghost for Linux and Acronis TrueImage that give you recovery option.

Otherwise,with more manual work you can use partimage with SystemRescueCD :
http://www.sysresccd.org/Main_Page

So you can back up your DB with backupexec and do system image with partimage.
So computers don't think yet. At least not chess computers. - Seymour Cray
Ralph Grothe
Honored Contributor

Re: Backup of linux server

Hi,

while in the "old" days one usually merely had taken a dump by the copy and change command dd from the partitions of a Linux box (which still would work), these days there are more sophisticated tools for a bare-metal recovery.
However the dump on its own wouldn't be enough.
First of all it is crucial to save the partition table of your OS disk(s).
I even would recommend sending an fdisk -l on the disk device to a printer and tuck it away in the folder of your other hard copy files of the respective host.

Before you take the dump you should redirect the output of an "sfdisk -d /dev/[hs]d[ab]" (take the device that applies to your installation) into a file that you could access from e.g. when you boot from a rescue CD (note that the RedHat bootable installation CD has a boot option "linux rescue"),
maybe some nfs or ftp server or even floppy, usb stick etc. would do?

You could then create the partition table on a new disk by redirecting the stdin from an sfdisk command on the new disk's device file from your back up file of the partition table.
e.g.

let's assume you mounted a floppy to /media/floppy and your OS is installed on the first SCSI disk.

# sfdisk -d /dev/sda > /media/floppy/sfdisk-d_dev_sda_$(uname -n).txt

In rescue mode you could mount the floppy and write the backed up partition table to your new disk.

# mkdir -p /mnt/floppy
# mount /dev/fd0 /mnt/floppy
# sfdisk /dev/sda < /mnt/floppy/sfdisk-d_dev_sda_hostname.txt
# sfdisk -l /dev/sda

You could also dump and save the MBRs of your OS disk and of its partitions.
But this is usually not necessary because the MBRs would be part of the total dump (and for extended partitions that you might have you already have taken above mentioned sfdisk dump).
However, just to be on the safe side you could write to the same floppy (or other place) that holds the partition table's backup.
e.g.

# dd if=/dev/sda of=/media/floppy/mbr_dev_sda.$(uname -n) bs=512 count=1

For taking the whole backup/dump there exist several better ways than good old dd.

I for instance liked the Partimage tool.
http://www.partimage.org/Main_Page

It has an interactive UI as well as a CLI which lends itself to scripting.
The nice thing is that you can even set up a partimage server that can (sufficient attached disk storage given) host whole backup dumps from several Linux hosts and can be accessed via network.

Just read the few pages of its manual.
It's pretty straight forward.

Apart from Partimage there are other solutions.

One with the non-technical user im mind
(it thus offers a GUI similar to Norton's Ghost) is called g4l (ghost for linux).
http://sourceforge.net/projects/g4l

A more technical approach is followed by
SystemImager which has its roots I assume in the Linux cluster projects.
With SI you therefore can create Golden Images like known from HP-UX Ignite to rapidly deploy many nodes from such an image.
http://sourceforge.net/projects/systemimager/
If I remember correctly, along this line are also tools like SystemConfigurator, SystemInstaller etc.

Apart from those there are many more tools better suited than dd.
I would think that the Complete Backup and Recovery Howto from the LDP should list a few other options:

http://tldp.org/HOWTO/Linux-Complete-Backup-and-Recovery-HOWTO/
Madness, thy name is system administration
Andrea Rossi
Frequent Advisor

Re: Backup of linux server

unfortunately backup exec has no ds option for remote linux servers (only win32).
nasmel
Frequent Advisor

Re: Backup of linux server

i configured backup exec to take the backup of / excpt oracle files.In the case of system crash ,is it possible to
reinstall my linux servers and to overwrite the / ...will it work ?
nasmel
Frequent Advisor

Re: Backup of linux server

thanks