Re: 3.2.0: Bug with German umlauts

2010-10-22 Thread Jean-Louis Martineau

Marc,

It's a bug that can only be seen with the bsd auth.
Attached patch fix it, can you try it?

Jean-Louis

Jean-Louis Martineau wrote:

Marc Muehlfeld wrote:

/bin/tar: This does not look like a tar archive
/bin/tar: Skipping to next header
/bin/tar: Archive contains obsolescent base-64 headers
/bin/tar: Read 7944 bytes from -

It has nothing to do with umlauts.

I suspect a bug in the handling of the bsd auth in amrecover.
Can you try the bsdtcp auth?
You need to setup an inetd/xinetd entry on the server and run 
amrecover with '-oauth=bsdtcp'


Jean-Louis



diff --git a/recover-src/extract_list.c b/recover-src/extract_list.c
index baac507..3f8cbae 100644
--- a/recover-src/extract_list.c
+++ b/recover-src/extract_list.c
@@ -96,6 +96,9 @@ static char *dump_device_name = NULL;
 static char *errstr;
 static char *amidxtaped_line = NULL;
 extern char *localhost;
+static char header_buf[32768];
+static int  header_size = 0;
+
 
 /* global pid storage for interrupt handler */
 pid_t extract_restore_child_pid = -1;
@@ -2106,6 +2109,7 @@ writer_intermediary(
 ctl_data.bsu   = NULL;
 ctl_data.bytes_read= 0;
 
+header_size = 0;
 security_stream_read(amidxtaped_streams[DATAFD].fd,
 			 read_amidxtaped_data, &ctl_data);
 
@@ -2687,7 +2691,18 @@ read_amidxtaped_data(
 	GPtrArray  *errarray;
 	g_option_t  g_options;
 	data_path_t data_path_set = DATA_PATH_AMANDA;
+	int to_move;
+
+	to_move = MIN(32768-header_size, size);
+	memcpy(header_buf+header_size, buf, to_move);
+	header_size += to_move;
 
+	if (header_size < 32768) {
+security_stream_read(amidxtaped_streams[DATAFD].fd,
+ read_amidxtaped_data, cookie);
+	return;
+	}
+	assert (to_move == size);
 	/* parse the file header */
 	fh_init(&ctl_data->file);
 	parse_file_header(buf, &ctl_data->file, (size_t)size);


Re: 3.2.0: Bug with German umlauts

2010-10-22 Thread Jean-Louis Martineau

Marc Muehlfeld wrote:

/bin/tar: This does not look like a tar archive
/bin/tar: Skipping to next header
/bin/tar: Archive contains obsolescent base-64 headers
/bin/tar: Read 7944 bytes from -

It has nothing to do with umlauts.

I suspect a bug in the handling of the bsd auth in amrecover.
Can you try the bsdtcp auth?
You need to setup an inetd/xinetd entry on the server and run amrecover 
with '-oauth=bsdtcp'


Jean-Louis



Re: 3.2.0: Bug with German umlauts

2010-10-22 Thread Jean-Louis Martineau

Can you restore file that have no umlaut? try: add *

Can you post the debug files
 amrecover.*.debug from the client

 amandad.*.debug, amindexd.*.debug and amidxtaped.*.debug from the server

Send them for both run, with the 2.6.1p2 and 3.2 client.

Jean-Louis

Marc Muehlfeld wrote:

It's getting more and more strange:

Restore of a file with umlaut totally fails if you try to restore over 
network (client and server are both 3.2.0). It's even impossible to 
use wildcards:



# amrecover TestSet -s nucleus -t nucleus
AMRECOVER Version 3.2.0. Contacting server on nucleus ...
...
amrecover> ls
...
2010-10-22-09-32-21 "M\\303\\266gliche Zusatzkosten f\\303\\274r 
QM-Projekt.odt"

amrecover> add M*
Added file "/M\\303\\266gliche Zusatzkosten f\\303\\274r QM-Projekt.odt"
amrecover> extract
...
Extracting files using tape drive HDD_Test_Changer on host nucleus.
Load tape TestSet002 now
Continue [?/Y/n/s/d]? y
/bin/tar: This does not look like a tar archive
/bin/tar: Skipping to next header
/bin/tar: Archive contains obsolescent base-64 headers
/bin/tar: Read 7944 bytes from -
/bin/tar: ./M\303\266gliche Zusatzkosten f\303\274r QM-Projekt.odt: 
Not found in archive

/bin/tar: Error exit delayed from previous errors



If I downgrade the client to 2.6.1p2, I can restore files when using 
wildcards from an 3.2.0 server. But the usage of wildcards is still 
necessary.



Regards,
Marc






Re: tapecycle and tape order

2010-10-22 Thread Brian Cuttler

I'll add to that.

We have been fouling up our tape order because the magazine
in the jukebox doesn't always get switched or we replace a
tape or...

I know there must be a better mechanism but I'm not above
editing the tapelist file directly. I put the tapes in the
order I want, as Charles said, bottom tape is usually taken
next, first in the list was most recently used, but there
is now a selection issue where amanda is tending towards
re-use of available tapes before selecting new tapes.

So I also tend to alter the use date for the tape when I move
on around in the list.

YMMV

On Fri, Oct 22, 2010 at 12:42:00AM -0600, Charles Curley wrote:
> On Thu, 21 Oct 2010 22:36:07 -0700
> Christ Schlacta  wrote:
> 
> > if I have a theoretical tapecycle of 20, and the obvious 20 tapes,
> > but a small changer with only 2-5 slots, which I intend to load daily
> > with the required tapes for the night's run, is it safe to assume
> > that amanda will *ALWAYS* request tapes in the same numerical order,
> > or can it at any point pick an arbitrary tape from the list?
> 
> It is not safe. If you start removing and creating tapes (for example
> as they wear out, as you need more capacity, etc.) they will get out of
> numeric sequence.
> 
> "amadmin  tape" is your friend. E.g.:
> 
> bac...@chaffee:~$ amadmin DailySet1 tape
> The next Amanda run should go onto tape DailySet1_24 or a new tape.
>tape DailySet1_25 or a new tape.
> bac...@chaffee:~$
> 
> Your report for each dump will indicate which tape it wants next:
> 
>  These dumps were to tape DailySet1_22.
>  The next 2 tapes Amanda expects to use are: DailySet1_23, DailySet1_24.
> 
> Unless you muck with the tapes in the interval.
> 
> (The two reports probably differ because I had a backup going on while
> I ran amadmin.)
> 
> Also, you can predict the next several tapes by looking at the file
> "tapelist". Tapes at the bottom are up next.
> 
> 
> -- 
> 
> Charles Curley  /"\ASCII Ribbon Campaign
> Looking for fine software   \ /Respect for open standards
> and/or writing?  X No HTML/RTF in email
> http://www.charlescurley.com/ \No M$ Word docs in email
> 
> Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB
---
   Brian R Cuttler brian.cutt...@wadsworth.org
   Computer Systems Support(v) 518 486-1697
   Wadsworth Center(f) 518 473-6384
   NYS Department of HealthHelp Desk 518 473-0773



IMPORTANT NOTICE: This e-mail and any attachments may contain
confidential or sensitive information which is, or may be, legally
privileged or otherwise protected by law from further disclosure.  It
is intended only for the addressee.  If you received this in error or
from someone who was not authorized to send it to you, please do not
distribute, copy or use it or any attachments.  Please notify the
sender immediately by reply e-mail and delete this from your
system. Thank you for your cooperation.




Re: tapecycle and tape order

2010-10-22 Thread Chris Hoogendyk



On 10/22/10 1:36 AM, Christ Schlacta wrote:
if I have a theoretical tapecycle of 20, and the obvious 20 tapes, but a small changer with only 
2-5 slots, which I intend to load daily with the required tapes for the night's run, is it safe to 
assume that amanda will *ALWAYS* request tapes in the same numerical order, or can it at any point 
pick an arbitrary tape from the list? 


See http://wiki.zmanda.com/man/amanda-taperscan.7.html

I have around 35 tapes and a library that holds 16. I change out a weeks worth of tapes at a time. 
It's always worked nicely and sequentially for me, with the one odd caveat that the traditional 
taper algorithm will skip over a new tape in preference for an already written tape that is eligible 
for reuse. That only happened when I had a tapecycle that was less than the capacity of the library 
(otherwise I wouldn't have those tapes cycled back in to the library), and I got around it by 
temporarily bumping the size of the tapecycle so that it had to use a new tape.



--
---

Chris Hoogendyk

-
   O__   Systems Administrator
  c/ /'_ --- Biology&  Geology Departments
 (*) \(*) -- 140 Morrill Science Center
~~ - University of Massachusetts, Amherst



---

Erdös 4




Re: 3.2.0: Bug with German umlauts

2010-10-22 Thread Marc Muehlfeld

It's getting more and more strange:

Restore of a file with umlaut totally fails if you try to restore over network 
(client and server are both 3.2.0). It's even impossible to use wildcards:



# amrecover TestSet -s nucleus -t nucleus
AMRECOVER Version 3.2.0. Contacting server on nucleus ...
...
amrecover> ls
...
2010-10-22-09-32-21 "M\\303\\266gliche Zusatzkosten f\\303\\274r QM-Projekt.odt"
amrecover> add M*
Added file "/M\\303\\266gliche Zusatzkosten f\\303\\274r QM-Projekt.odt"
amrecover> extract
...
Extracting files using tape drive HDD_Test_Changer on host nucleus.
Load tape TestSet002 now
Continue [?/Y/n/s/d]? y
/bin/tar: This does not look like a tar archive
/bin/tar: Skipping to next header
/bin/tar: Archive contains obsolescent base-64 headers
/bin/tar: Read 7944 bytes from -
/bin/tar: ./M\303\266gliche Zusatzkosten f\303\274r QM-Projekt.odt: Not found 
in archive

/bin/tar: Error exit delayed from previous errors



If I downgrade the client to 2.6.1p2, I can restore files when using wildcards 
from an 3.2.0 server. But the usage of wildcards is still necessary.



Regards,
Marc


--
Marc Muehlfeld (IT-Leiter)
Zentrum fuer Humangenetik und Laboratoriumsmedizin Dr. Klein und Dr. Rost
Lochhamer Str. 29 - D-82152 Martinsried
Telefon: +49(0)89/895578-0 - Fax: +49(0)89/895578-78
http://www.medizinische-genetik.de


Re: [Check_mk (english)] mpre.cfg

2010-10-22 Thread Marc Muehlfeld
Ups. Sorry. Answer was send to the wrong mailing list (should go to check_mk 
instead of the amanda-user list). :-)


Re: [Check_mk (english)] mpre.cfg

2010-10-22 Thread Marc Muehlfeld

Am 22.10.2010 12:13, schrieb mbizwo simon:
> or do i install check_mk on myserverip as well ?

On each client you want to monitor via check_mk, you have to install the 
check_mk agent that is executed via (x)inetd.


http://mathias-kettner.de/checkmk_getting_started.html




If i got all well , /etc/check_mk is in the nagios  monitoring server ?
But now if i go to my server i don't have the /etc/check_mk folder to
create the mrpe.cfg, where do  i create my mrpe.cfg file in the
myserverip ?


On the nagios host, where you installed check_mk, you have /etc/check_mk (were 
main.mk and others files are located). If you run checks on the nagios host 
via MRPE, you have just to create the mrpe.cfg file. On clients that have just 
the check_mk agent, you have to create this folder and the mrpe.cfg file by 
yourself.





Thre is an asterisk plugin already on myserverip ,i wanted to use that
one, is there any easier to monitor Asterisk using check_mk   ?


Depending on the plugin you have, you have to decite from where it has to be 
executed. If it's a plugin that checks something local (like processes, 
existence of files,...) you have to put it on the client.


If it's something that does a remote check (like checking if a port is open or 
a webpage can be reached,...) the plugin is executed from the nagios host, 
because you want to check if the service is available over network. Of course 
you can execute remote checks on other hosts too (e. g. if you want to check 
if a MySQL login is possible from host A to host B, you put the plugin to Host 
A and execute it via MRPE).


For other asterisk plugins see nagios plugin pages like 
http://nagiosplugins.org/


Regards,
Marc



--
Marc Muehlfeld (IT-Leiter)
Zentrum fuer Humangenetik und Laboratoriumsmedizin Dr. Klein und Dr. Rost
Lochhamer Str. 29 - D-82152 Martinsried
Telefon: +49(0)89/895578-0 - Fax: +49(0)89/895578-78
http://www.medizinische-genetik.de


3.2.0: add command in amrecover fails on trailing slash of directory names

2010-10-22 Thread Marc Muehlfeld

Hello,

I did testings with 3.2.0 and discovered a problem in amrecover. In previous 
versions, I copy/pasted directory names to the 'add' command. This fails now, 
because 'add' doesn't accept the '/' at the end any more. If I type it 
without, it works.:


amrecover> ls
2010-10-21-21-00-02 "test/"

amrecover> add "test/"
File "test/" doesn't exist in directory
amrecover> add "test"
Added dir "/test/" at date 2010-10-16-21-00-02

The 'cd' command still allows the slash at the end like privious version.

Regards,
Marc


--
Marc Muehlfeld (IT-Leiter)
Zentrum fuer Humangenetik und Laboratoriumsmedizin Dr. Klein und Dr. Rost
Lochhamer Str. 29 - D-82152 Martinsried
Telefon: +49(0)89/895578-0 - Fax: +49(0)89/895578-78
http://www.medizinische-genetik.de


3.2.0: Bug with German umlauts

2010-10-22 Thread Marc Muehlfeld

Hello,

I reported this problem for 2.5.1p2 and it was fixed by Jean-Louis. It came 
back in 3.1.1, where I got a patch from Dustin which fixed it for restoring on 
the server, but not when restoring on the client. But he said it was to late 
to add the patch to 3.1.2. Today I upgraded to 3.2.0 and it's still broken.


amrecover shows files with umlauts:

2010-10-22-09-32-21 "M\\303\\266gliche Zusatzkosten f\\303\\274r QM-Projekt.odt"

The only way to recover is adding the file with wildcards (like 'add 
M*gliche*'), but makes recovering an annoyning job.


I hope, there is a way to finally fix this soon again (like in 2.5.1p2 some 
years ago). Thanks.


Regards,
Marc


--
Marc Muehlfeld (IT-Leiter)
Zentrum fuer Humangenetik und Laboratoriumsmedizin Dr. Klein und Dr. Rost
Lochhamer Str. 29 - D-82152 Martinsried
Telefon: +49(0)89/895578-0 - Fax: +49(0)89/895578-78
http://www.medizinische-genetik.de