Re: Restore from multiple configs
2007-06-26 14:28:19
Hi Harald,
I'm going to ignore your details and key on the concept : you want to
have a weekly and a daily back up.
I wanted to do this too and went down the path of investigating multiple
configurations like you are doing. But it really bugged me that I have
to basically do 2 level-0 backups a week, one for the weekly and one for
the daily (since the daily backup configuration isn't aware of the
weekly). My reason for having a weekly backup is because I want to be
able to archive the tapes periodically, but I don't need to have the 2
configurations fully separate.
After messing around, I finally figured out that what I wanted was a
single configuration with a forced level 0 on saturday night.
So, I set up a single "daily" configuration. Inside /etc/amanda/daily I
added a scripts called "forceall" that looks like this:
-bash-3.00$ cat forceall
#!/bin/sh
/usr/sbin/amadmin daily force \
windsor / \
gilmore / \
gilmore /backedup/project \
gilmore /backedup/home \
gateway2 / \
imap / \
asterisk /
- so yes, I have to specify all my disk entries in this file, which is a
pain and a possible issue when you change the entries - but my disk
configuration is pretty stable.
(I also created an "unforceall" is the same with the "force" parameter
changed to "unforce" for testing.)
My crontab looks like:
#
# ---------------- minute (0-59)
# | ------------- hour (0-23)
# | | ---------- day of month (1-31)
# | | | ------- month (1-12)
# | | | | ---- day of the week (0-7 sunday = 0 or 7)
# | | | | |
# * * * * *
# check the configuration each evening
00 20 * * 0-5 /usr/sbin/amcheck -m daily
# run pgrdaily every weekday and Saturday morning
05 03 * * 1-6 /usr/sbin/amdump daily
# on Saturday morning, make sure its a level 0
00 03 * * 6 /etc/amanda/daily/forceall
amdump doesn't run on Sunday, giving the Saturday job enough chance to
dump everything as it can take more than 24 hours for a full level 0.
But each Saturday before the dump, I run the forceall script that tells
amanda to make the next run a level 0.
This is working really well for me. Any weekend I have a level 0 set of
tapes that I can pull and put into the safe or off-site backup, but I
don't have to pay the overhead of doing 2 level 0's, one for the weekly
and one for the daily/cycle.
I just thought I would suggest this as an alternative to a 2
configuration setup.
When I pull the tapes, I have a system for marking the out-going tapes
as being not reused, and then adding the new tapes into the rotation.
If you are interested in going ahead with the above kind of idea I can
send you the details on that too.
Anyway, hopefully you find this idea interesting.
Don
(ps: and I know this isn't really the recommended way of doing things...
the recommended way is "just let amanda schedule it all" - but I've
found this to work very well for me. I usually only pull my archive
once a month and I have considered changing the cronjob to only force
the level 0 once a month rather than once a week - but my backups do
occassionally have a glitch and fail to run, so having them go weekly
allows me to just wait for next week if there was a problem, rather than
having to either wait a month or manually mess with something.)
Harald Schioeberg wrote:
Hello again.
In my struggle to get a working amanda config (working for my strange
setup :)
I reached the following decision:
I'll use two configs,
- "Weekly", which does level-0 dumps to tape (using chg-zd-mtx)
- "Daily", which does incrementals to a virtual tape on disk
(using chg-disk)
As it is cumbersome to restore stuff from different configs, I wrote
"chg-multiplex", which acts as a super-changer and combines the two
configs for restore purposes.
If you like the idea, have a look at:
http://wiki.zmanda.com/index.php/Chg-multiplex
If you don't: sorry for the spam :)
--
Harald Schioeberg
Technische Universitaet Berlin | T-Laboratories | FG INET
www: http://www.net.t-labs.tu-berlin.de
Phone: +49-(0)30-8353-58476 | Fax: +49-(0)391 534 783 47
|
|
|