[CentOS] CentOS Server Backup Options

Mon Mar 12 02:41:18 UTC 2012
Raymond Lillard <rlillard at sonic.net>

There are three reasons backups are made.

1: Protect from hardware failure

2: Protection from user deletion and/or corruption
    of files whether accidental or otherwise. (Yes,
    there are people who will intentionally damage
    a filesystem.)

3: Fire or other natural disasters.

 From your description below, you seem reasonably well
protected against hardware failure.  I would not run
RAID5 with three disks though.  Instead, I would run
RAID1 with the third disk as a hot-standby.  For the
amount of data you are managing, 300GB is plenty of
space for 25GB and CentOS.

Protection from filesystem damage requires a rolling
archive such as can be created the dump program.  Think
about dump in a tower-of-hanoi level sequence, or similar.
This archive should be maintained on a separate device.
Running a crontab scheduled dump every night will preserve
all files as they exist at the close of business each day.

Protection of data from natural disasters requires that
off-site backups be made.

The old school way to address all above was tape rotation.
As disks have become more affordable various forms of RAID
have taken #1 off the list of reasons to do tape rotation.

These days other choices are available.

An archive tree still needs to be maintained. My view is
that the tree should be maintained on a local disk.  Creating
an off-site backup is simply taking a snapshot of the dump
tree and transporting it to a safe place.

The off-site issue is something you need to address with your
client.  I always make the client assume the responsibility
for setting the frequency of off-site backups and of actually
doing them.

As to the backup device, I would suggest a USB hard-drive.
I happen to have a 64GB USB flash drive I use to transport
data.  Such a device or smaller, if rotated weekly could be
the backup device.  My recommendation would be to attach a
USB hard-drive to the system and maintain the dump tree
on it.  I would use the USB thumb drive for a transport device.
25GB of data isn't very much.

I don't know if you and perl have made friends.  Personally,
I do most of my system specific scripting in Perl rather
than shell code, but that's just me.

I have a perl program I use to do exactly what I have described
above for a client who has about 100GB of data to protect.

This program builds a hierarchy of weekly folders.  On the
first work-week of each quarter, it will write a level 0
dump file.  All the daily files are incremental from that
dump.  The drive the dump-tree is on has more than sufficient
space to keep a year's worth of backups.  Once a quarter
the client takes a snapshot of the most recently completed
quarter's tree.

If you (or any others on the list) would like the program
I will send if.  If several ask, I will just post it.  It
is only about 350 lines with some comments.


On 03/11/2012 05:12 PM, Scott Walker wrote:
> What do you guys recommend for backing up a small CentOS server in a
> business environment.  It will have (3) 300gb drives in a raid 5 array but I
> don't anticipate more than about 25gb of data that needs to be backed up
> each night.
> I want a lot of backups with a rotation scheme that included daily, weekly,
> and monthly copies.  I want the daily copies of the data kept until the next
> week, and the weekly copy being kept for four weeks, and the monthly copies
> being kept for a year.
> The vendor is recommending a RD1000 Removable Disk device.  This looks like
> it has great specs.  Each cartridge holds 160gb (non-compressed) and the
> drive costs about $420 but seems that with each removable cartridge costing
> $128, we may be limited to how many cartridges we could have, thus perhaps
> not retaining backup instances as long as I like.
> I asked about a HP DAT160 tape drive.  Each tape holds 160gb
> (non-compressed) and the drive costs about $730, and each tape only costs
> about $24, so it would be economical to have lots of backup instances saved
> for a long period of time.
> I have been using tape and the backup rotation scheme mentioned above for
> over 20 years.  The vendor is telling me they don't recommend tape drives
> anymore and all of their customers are using removable hard drive for local
> backups.  Am I missing something?  My instincts tell me the tape drive is
> the right solution for a system with a small amount of data, where the
> system is used only from 8am - 5pm (so backup speed is not critical) and
> where we want to save backup instances for a long time before overwriting
> them.
> Any input would be welcomed.
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos