Re: Restore from multiple configs

2007-06-27 Thread Don Murray


Jon, thanks for the suggestions.  I will give them a try (carefully :))

Don


Jon LaBadie wrote:

On Tue, Jun 26, 2007 at 10:29:45AM -0700, Don Murray wrote:
  


Just a couple of minor things, but if it ain't broke, don't fix it.


  

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.



The amadmin command documents the force command as:

force [ hostname [ disks ]* ]+

I.e. the disk names, and even the host names are optional.  If you are
forcing every DLE to a level 0 this suggests you could simplify
your script to just listing hostnames, and even omitting them.


  

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.




I'd be concerned that the forceall was missed.  Yeah 5 minute difference
is not much.  But another way you could set up your crontab is to do
the amdump daily only 5 times a week and on Saturday do a combination
of  forceall  amdump daily.

Do you set up your dumptype to do incronly so it will never do a level 0
on its own?


--
Jon H. LaBadie  [EMAIL PROTECTED]
 JG Computing
 4455 Province Line Road(609) 252-0159
 Princeton, NJ  08540-4322  (609) 683-7220 (fax)
  


Restore from multiple configs

2007-06-26 Thread Harald Schioeberg
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


Re: Restore from multiple configs

2007-06-26 Thread Don Murray


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
  


Re: Restore from multiple configs

2007-06-26 Thread Harald Schioeberg
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


 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).  

It is. Just use the same logdir.

Harald


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGgV/aJgyxs71kcx4RAgMKAJ4ltrXhSCFfTYR3zpe04bGG8v074QCeMKXa
UjxjFUlpqx1iHwxb1e1hQF4=
=1W8Y
-END PGP SIGNATURE-


Re: Multiple configs

2002-07-21 Thread Frank Smith

--On Saturday, July 20, 2002 19:51:01 -0500 Craig Hancock [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:

 Hello all,
 
 I was wondering what is the best wato configure amanda. I 
 basically have a 2 dape drives and a 40 tape autoloaders and I want
 to make 2 configs. I found very little information about how to
 setup this up and I was wondering if someone can point me into the right 
 direction.
 
 Craig Hancock

It's just like having one config with two major caveats:

1. Be very careful if the same disklist entry is in both configs. The
info for dumpdates can get clobbered and screw up the incrementals.
If you just want the second config to do fulls for offsite storage,
set record to no and allwaysfull.

2. Make sure that the run times don't overlap. Only one can run at a time
unless you compile two versions with different names and portranges.

Good luck,
Frank

--
Frank Smith[EMAIL PROTECTED]
Systems Administrator Voice: 512-374-4673
Hoover's Online Fax: 512-374-4501



infofile and multiple configs...

2002-05-02 Thread Chris Noon

I was reading through my amanda.conf and I saw this line:


#You need a separate infofile and
# logdir for each configuration, so create subdirectories for each conf
and
# put the files there.  Specify the locations below.

Well, I don't have separate infofiles and logdirs for each config, and
never have... Everything seems to be working fine, as I've done many
restores from each config.  So could someone shed some light on the
above statement Thanks in advance.

--Chris




Re: infofile and multiple configs...

2002-05-02 Thread Jon LaBadie

On Thu, May 02, 2002 at 09:54:15AM -0400, Chris Noon wrote:
 I was reading through my amanda.conf and I saw this line:
 
 
 #You need a separate infofile and
 # logdir for each configuration, so create subdirectories for each conf
 and
 # put the files there.  Specify the locations below.
 
 Well, I don't have separate infofiles and logdirs for each config, and
 never have... Everything seems to be working fine, as I've done many
 restores from each config.  So could someone shed some light on the
 above statement Thanks in advance.

My daily backup is its own config.  

However, for several of my archive configs I do something similar.  
They share a common logdir which includes curinfo, index, tapelist,
and changer files.  Each config then has its own directory including
only amanda.conf and disklist.  In fact, the amanda.conf files are
so similar they could be merged and simply be links to a single conf.

I too have encounted no problems, but would be interested in a definitive
answer to what potential problems exist.  My guess, and it is strictly
a guess, is that the problems are minimal or non-existent if there are
no duplicate disklist entries among the configs.

In my case, I'm archiving the tapes, setting them aside for permanent
keeping.  They even have the same tape label pattern.  I could see a
problem if I were reusing the tapes in a limited tapecycle.

A more definitive rather than emperical answer will be appreciated.

-- 
Jon H. LaBadie  [EMAIL PROTECTED]
 JG Computing
 4455 Province Line Road(609) 252-0159
 Princeton, NJ  08540-4322  (609) 683-7220 (fax)



Re: infofile and multiple configs...

2002-05-02 Thread Chris Noon


On Thu, 2002-05-02 at 10:55, Jon LaBadie wrote:
 On Thu, May 02, 2002 at 09:54:15AM -0400, Chris Noon wrote:
  I was reading through my amanda.conf and I saw this line:
  
  
  #You need a separate infofile and
  # logdir for each configuration, so create subdirectories for each conf
  and
  # put the files there.  Specify the locations below.
  
  Well, I don't have separate infofiles and logdirs for each config, and
  never have... Everything seems to be working fine, as I've done many
  restores from each config.  So could someone shed some light on the
  above statement Thanks in advance.
 

 I too have encounted no problems, but would be interested in a definitive
 answer to what potential problems exist.  My guess, and it is strictly
 a guess, is that the problems are minimal or non-existent if there are
 no duplicate disklist entries among the configs.

Actually, I have many duplicate disklist entries spread across a few
configs.  Though, I have some configs doing only Level 0's and another
doing only incrementals (i know, i know, but my company is a little old
fashioned), so I am thinking that these configs would need to share a db
in order to figure out what gets dumped for incrementals also just a
guess...

--Chris




Re: infofile and multiple configs...

2002-05-02 Thread Toomas Aas

 #You need a separate infofile and logdir for each configuration, so create 
subdirectories for each conf

 Well, I don't have separate infofiles and logdirs for each config, and
 never have... Everything seems to be working fine, as I've done many
 restores from each config.  

I have two configs, DAILY and WEEKLY, the first running Mon-Thu and 
the second running Fri. Both have tapecycles of 5 and do full dumps 
only.

It took me a long time to figure out why amrecover complained that 
index records are not available when I tried to recover some files 
from older WEEKLY configs. I checked and the indexes definitely 
*were* available.

The problem turned out to be that both configs had the same logdir,
although they did have separate indexdirs. When DAILY backup ran, it 
apparently checked the logdir and moved the logs that it considered 
old into separate oldlog directory. Including the WEEKLY logs - 
my DAILY config must have thought that these are so old that tapes 
have been overwritten.

When I manually moved the logs back from the oldlog directory I 
could sucessfully run amrecover.

After that I created separate logdirs for both configs, and haven't 
had problems since.

This is with Amanda 2.4.2p1. It was also some months ago so I 
apologize for not remembering the exact error messages that amrecover 
gave me.

--
Toomas Aas | [EMAIL PROTECTED] | http://www.raad.tartu.ee/~toomas/
* Nostalgia isn't what it used to be...




Re: How to manage changer stage with multiple configs

2001-11-27 Thread Mitch Collinsworth


On Tue, 27 Nov 2001, Michael D. Beynon wrote:

 I am trying to setup the obvious: full backup (say Friday) and
 incremental (Monday - Thursday).  I am using a tape changer (Sun
 StorEDGE L9) with DLT tapes.  I have mtx installed, thus am using the
 chg-zd-mtx glue script for controlling the robot.  This script
 maintains the changer state in /usr/local/etc/amanda/cfgname/...
 
 My question is if I then create a new configname for the incremental
 backups, won't there be a state consistency problem between these two
 config dirs?  It seems like the state files should be common across
 all configs that use that changer.
 
 Suggestions?

symlinks

-Mitch