-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Mark LaPierre Sent: Sunday, March 11, 2012 8:37 PM To: CentOS mailing list Subject: Re: [CentOS] CentOS Server Backup Options
On 03/11/2012 08: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.
What do you consider to be a "long time" to keep backups on hand?
I like to have an archive copy of the data for each of the last twelve months.
I also like to have an archive copy of the data for each of the last 4 years.
That way if any files get accidently deleted, I still have a backup that is old enough to contain them.
Tape, and tape drives, have a bad reputation. They are difficult and time consuming to verify.
Indeed I've had lots of trouble with tape drives over the years. The DAT drives worked well when they worked but they always seemed to die after 4 or 5 years. With the small amount of data I have to worry about (in the range of 25 - 30gb) the time to backup to tape and verify in the middle of the night is not a factor.
I run my backups nightly to a hard drive using rsync. I use a directory named by the day of the week. I cycle through the seven daily directories until the 1st of the month when I run a complete backup to an monthly directory. Then for the next seven days I wipe the daily directories and start the cycle over again.
A couple of minor variations to this plan should work for you. I don't know what your network configuration looks like so this may not apply to you.
Here's a peek at the logic I use.
# BUILD DATE STAMP Date=`date +%Y%m%d` echo "Date= "$Date""
# Rev. 5.6 start Day=`date +%a` echo "Day= "$Day""
DayNum=`date +%d` # Rev. 7.0
# IF THIS IS A SUNDAY USE THE CALANDAR DATE if [ "$Day" == "Sun" ];then Day="$Date" else # IF THIS IS THE 1ST OF THE MONTH USE THE CALANDAR DATE if [ "$DayNum" == "01" ];then Day="$Date" fi fi
# USE THE DAY OF THE WEEK, EXCEPT FOR SUNDAY AND THE 1ST OF THE MONTH WHICH IS HANDLED ABOVE, AS THE DIRECTORY NAME Date="$Day"
# Rev. 5.6 end
# REMOVE PREVIOUS $Date DIRECTORY IF THIS IS THE FIRST USE THIS MONTH # Rev. 7.0 ENTIRE CASE STATEMENT ADDED case $DayNum in 02) echo "Removing /home/homebu/$Date directory" rm -rf /home/homebu/$Date ;; 03) echo "Removing /home/homebu/$Date directory" rm -rf /home/homebu/$Date ;; 04) echo "Removing /home/homebu/$Date directory" rm -rf /home/homebu/$Date ;; 05) echo "Removing /home/homebu/$Date directory" rm -rf /home/homebu/$Date ;; 06) echo "Removing /home/homebu/$Date directory" rm -rf /home/homebu/$Date ;; 07) echo "Removing /home/homebu/$Date directory" rm -rf /home/homebu/$Date ;; *) echo "Old $Date directory not deleted" ;; esac
# TRANSER FILES
-- _ °v° /(_)\ ^ ^ Mark LaPierre Registerd Linux user No #267004 _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos