Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linux ..full system backup

Status
Not open for further replies.

cts123

Technical User
Feb 28, 2007
108
0
0
IN
Hi Gurus,

I am not a Linux admin guy, but I have only one server in Data Center ( among bunch of AIX server) which has Red Hat Enterprise Linux ES release 4 (Nahant) and acting as a Send-mail server of the organization.

Could you tell me what is the best way to take the whole system backup? My objective is, in case of any hardware issue with the machine, I should have a backup of whole system. I will just boot the machine through that CD or backup media and will restore the whole data. So, it will make the server back to the form.

I do "mksysb" for AIX, which is suggested method by IBM to keep the system "rootvg" backup of whole AIX server.

I am looking for similar process on Red Hat Linux.

Any suggestion on this will be highly appreciated.

Regards,
-Sam
 
I think the good old "tar" specifying -p option to preserve permissions, can be appropriate.

Obviously there are many other solutions for this task but, tar is versatile, easy to restore after a basic install, and very reliable.
If backup media space is a problem then the -z option will create a tarball already compressed with gzip.


QatQat




If I could have sex each time I reboot my server, I would definitely prefer Windoz over Linux!
 
I strongly recommend Mondo Rescue which can be configured to create ISO CD images so that, in the event of complete hardware failure, you can rebuild in exactly the same way as an AIX mksysb.

This script is run from cron and creates the ISO images in /usr/local/backup
Code:
# cat backup-server.sh
#!/bin/sh

#Define Commands
IP=/sbin/ip
MONDO=/usr/sbin/mondoarchive
SSH=/usr/bin/ssh
SCP=/usr/bin/scp
GREP=/bin/grep
RPM=/bin/rpm
AWK=/bin/awk


#Log Backup Progress
export LOG=/var/log/backup.log

echo "Mondo Backup started at $(date)" > ${LOG}

#Start Mondo backup
if [ $# -eq 0 ] ; then
        export BACKUP_DIR=/usr/local/backup
        export EXC_DIR="/usr/local/backup /opt/bmc_products"
else
        export BACKUP_DIR=$1
        export EXC_DIR=$*
fi

#Create backup directory if it does not already exist
if [ ! -d  ${BACKUP_DIR} ] ; then
        if ! mkdir ${BACKUP_DIR} ; then
                echo "ERROR - problem backing-up to this directory" >> ${LOG}
                exit 255
        fi
fi

#Backup Server image to ".iso" files
# -N Local filesystems only
# -F Don't write boot diskettes
# -E Exclude directories
# -T Temporary working directory
# -S Scratch directory where .ISO's are built
# -iO Output to ISO files

${MONDO} -iO -S $BACKUP_DIR -T $BACKUP_DIR -E "$EXC_DIR" -9 -d $BACKUP_DIR -N -F >>${LOG} 2>&1
Oh, and by the way, it's Open Source and free.

Ceci n'est pas une signature
Columb Healy
 
Columb,

Thanks a lot to share this information. If I don't have any CD writer present in the server ( as the send-mail server is running on a Dell Intel server and mounted in a rack in Data center, I am using telnet to manage the server), hope I can go for some network server as well, where I can dump the backup image and burn the ISO image ..right ?

Your one more suggestion please.

Regards,
-Sam
 
columb - you're script is genious! Very useful - much appreciated.

Gaz :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top