We help IT Professionals succeed at work.

UnixBoxBackup/Image.

sam15
sam15 asked
on
What are the standard practice for backup up linux or unix server?

do you take full image of the box for disaster recovery and how often? any software you use.
Comment
Watch Question

BRONZE EXPERT
Commented:
Policies vary a lot from a company to another.  You can have backup solutions or you may simply use tar if your network is not overly complex.

You should create a compressed tar of each partition separately.  You can exclude files/folders and patterns in your tar.
You should avoid certain system folders, like /proc or /sys, etc.  Please you can make the backups of partitions that change rarely, less often than those that change every minute.

Author

Commented:
I think back is different than image. Do you tak an image in case box dies? How often it takes to build an image and often you do it normally?
Commented:
Hello,

If you take a whole image of the box (using acronis for instance) and your machine dies and you want to deploy the image on a new box that has different brand of hardware, most likely you are going to face a kernel panic. Its a hideous process after that, with live cd and maybe trying to re-compile the kernel few times. The later means a long down time which I don't know if you can afford.

Use image if you are going to use the same hardware.

For backup, you need to write down the important stuff. Databases, and mainly what resides under /etc/ and /home and all the related config files for the applications services you are using that do not sit under /etc/.

I would use rsync for backups. Rsync only copies the new files which will save time, cpu and network bandwidth.

http://linux.about.com/library/cmd/blcmdl1_rsync.htm

Good Luck!
I create a tar archive lately using a file copy of:
root/.ssh/*
root/*
local/etc/*
local/bin/*
etc/*
var/lib/samba/*
var/www/*
var/named/*
var/lib/mysql/*
var/spool/cron/*
var/lib/samba/private/*

I have found these files represent enough data to easily rebuild a Linux box quickly.  But my deployments are not complex, as in a big company.  You should be careful to make this list more complete for your implementation.  I have this list stored as /local/etc/tarbackup.list, and loaded by this shell script:



#!/bin/sh
xdate=`/bin/date +"%Y%m%d"`
for i in `cat /local/etc/tarbackup.list`
        do
        list="$list $i"
        done
(cd / ; /bin/tar czvf /tmp/host-$xdate.tgz $list)
chmod 700  /tmp/hostname-$xdate.tgz
scp  /tmp/hostname-$xdate.tgz someuser@somebackuphost:.
rm -rf /tmp/hostname-$xdate.tgz

Open in new window

Author

Commented:
I thought acronis claims it can restore images on different hardware. I am not sure if this works or not but i do not understand how this would work unless they check the target hardware and load all the drivers for that new hardware before copying the data.

Commented:
Hello,

I have used acronis on different hardware. The result was kernel panic.

Acronis takes an image with the kernel compiled to work for a certain hardware. You then, take this image, put it on a new hardware where the kernel in the image lacks the suitable drivers for this new hardware. Acronis lacks the capability to re-compile linux kernels enabling and adding new modules.

Good Luck!
Top Expert 2015

Commented:
You can always use UNIX native dd command,
still making TAR files from stopeed applications is a lot easier and more to the point.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.