newbie: weekly tape backup advice
jerrymc at clunix.cl.msu.edu
Mon Jun 23 12:19:32 PDT 2003
> I need some help setting up a tape backup system. I have two FreeBSD machines
> and on external SCSI Onstream ADR50. Got any clues how I can start a weekly
> back up plan here?
It depends a little on the size of your disk compared to your tape
capacity. It also depends on how much - amount and frequency - critical
If you can fit everything you want to back up on one tape, just run a
full backup (level 0 dump) each time being once per day or once per week
or whatever fits your data change pattern.
If your critical data change is a lot and a full backup of it will take
more than one tape, pick a convenient day of the week and do a full
back up and then do incremental backups (level 1 dump) other days.
If your disk is so big and the amount of change so much that a week's
worth of incremental backup needs more than one tape, then you will
want to do a weekly full backup and then increasing levels of
incremental back up (level 1 - 6) on the other days.
If your amount of data change is quite low - say it is just hosting a
fairly static web site and some information database you look at but
don't update very often, you might want to consider doing only a weekly
full backup or a monthly full backup and weekly incremental backups.
Use enough tapes so you are keeping at least three copies of each part
of the rotation before reusing a tape.
You may also want to do a quarterly or annual archive dump that you store
off site and do not reuse for several rotations.
For sure, you want to use dump(8). It is part of the system, does the
right things with the files and is reliable and doesn't take any tinkering.
Unless you have a lot of very critical files open and being changed all
the time, don't bother with the warnings about doing a dump on a non-running
system. The dump will work just fine. It only means that some file may
change between the time the dump started and when it finishes so that file's
backup image might not be good. But, if you are doing regular backups -_and
not just reusing the same tape all the time_- you will catch that file in a
good backup on another day.
The man page explains dump pretty well. Mostly you shouldn't need to
worry about block size and all the other special stuff. The defaults
work best for most circumstances.
Determining the media capacity may be the only difficult thing. If one
tape will hold the entire backup, just use the '-a' switch. That can
work well also for multiple tape dumps with tape drives that give a good
end-of-media indication. But some of them - DDS can be an annoying
example - tend to not work well when getting near the end of media and
will start getting write/read errors before the end-of-media indication
actually happens. Then, the system may not handle things very well and
you may want to do some calculating and experimenting with either the '-B nnn'
parameter or the '-d nnn' and '-s nnn' parameters to specify a media size
and force it to change tapes before the problem area is reached.
You need to run dump(8) as root. Eventually you will want to not have
to retype the dump commands each time or you will want it to run by cron
at some time you are not around, so either make a script and run it
while su-ed or logged in as root, or make a compiled program that will
do the dump calls and make it suid root and then make it owned by root
with a group of the only ids that will be allowed to run it and then
give it only 750 permissions.
One more thing from experience - do not run the head cleaner cartridge
any more often than you absolutely have to. In a very clean environment
that can actually mean never. But, you will probably need it now and
then. Experience will tell when. Those cleaners cause significant
wear on the heads and possibly the rest of the mechanism. It doesn't
take much to wear those tiny heads down to nothing. So, using them as
infrequently as possible will actually help increase head life, not
reduce it as some of the accompanying printed material often likes to
imply. I think they just way to sell more replacement tape drives.
> Thanks in advance,
More information about the freebsd-questions