Re: Invalid Service?

2008-04-28 Thread Tony van der Hoff
On 27 Apr at 12:17 Jean-Louis Martineau <[EMAIL PROTECTED]> wrote in
message <[EMAIL PROTECTED]>

> Tony van der Hoff wrote:
> > On 25 Apr at 13:22 "Stefan G. Weichinger" <[EMAIL PROTECTED]> wrote in
> > message <[EMAIL PROTECTED]>
>>
>>   
> > > Tony van der Hoff schrieb:
>>> 
> > > > Using Amanda 2.5.1p1 under Debian Etch, my backups work fine, and I
> > > > can recover partitions from tape using dd, etc.
>>>>
> > > > However: [EMAIL PROTECTED]:~$ sudo amrecover HomeDumps AMRECOVER Version
> > > > 2.5.1p1. Contacting server on localhost ... NAK: amindexd: invalid
> > > > service
>>>>
> > > > What does this message mean, and how to fix this?
>>>>   
> > > I think it means that you haven't read the docs on how to configure
> > > (x)inetd correctly.
>>>
> > > http://www.amanda.org/docs/install.html#id325457
>>>
>>>
>>> 
> >
http://wiki.zmanda.com/index.php/Quick_start#Configuring_xinetd_on_the_server
>>   
> > > Stefan
>>>
>>> 
> > Thanks for taking an interest, Stefan; that's what I thought, too. I
> > wish it were that simple. Maybe I'm missing something, but what is wrong
> > with this (3 seperate files, each with the same name as the service):
>>
> > # default: on # description: The amanda service service amanda { disable
> > = no socket_type= dgram protocol= udp wait  = yes 
> > user  = backup
> > group   = backup groups = yes server= 
> > /usr/lib/amanda/amandad
>>   
> add:  server_args = -auth=bsd amdump amindexd amidxtaped
> > }

Um, unfortunately the bit where I said the amanda service was running fine
(I can create perfect backups) got snipped at some stage. It is the amindexd
sevice that's failing to start. 

Anyway, I tried that, without success, I'm afraid. Thanks for the
suggestion, though.

>>   
>>
> > #default: on # description: The amanda index service service amandaidx {
> > disable = no socket_type= stream protocol   = tcp 
> > wait  = no user   =
> > backup group= backup groups = yes server
> > = /usr/lib/amanda/amindexd
> > }
>>
> > #default: on # description: The amanda tape service service amidxtape {
> > disable = no socket_type= stream protocol   = tcp 
> > wait  = no user   =
> > backup group= backup groups = yes server
> > =
> > /usr/lib/amanda/amidxtaped }
>>
>>
> > Oh, and all those paths are valid.
>>
>>   
>


-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Re: Invalid Service?

2008-04-28 Thread Tony van der Hoff
On 27 Apr at 2:17 "Donald Murray, P.Eng." <[EMAIL PROTECTED]> wrote in
message <[EMAIL PROTECTED]>

> Hey,
>
[snip]
>
> Which host or hosts are acting as the tape and index servers? If they
> aren't running on localhost, I think that's the error you'll see.
>
Thanks, Donald. Yes, they are running on localhost.

> You can configure the tape/index servers in
> /etc/amanda/amanda-client.conf.
>
I have no such file


-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Re: Invalid Service?

2008-04-25 Thread Tony van der Hoff
On 25 Apr at 14:02 "Stefan G. Weichinger" <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> Tony van der Hoff schrieb:
> > Thanks for taking an interest, Stefan; that's what I thought, too. I
> > wish it were that simple. Maybe I'm missing something, but what is wrong
> > with this (3 seperate files, each with the same name as the service):
>
> > #default: on # description: The amanda index service service amandaidx {
> > disable = no socket_type= stream protocol   = tcp 
> > wait  = no user   =
> > backup group= backup groups = yes server
> > = /usr/lib/amanda/amindexd
> > }
> >
> > Oh, and all those paths are valid.
>
> And (x)inetd was restarted?
>
yes (frequently).

> Show "ls -l /usr/lib/amanda/amindexd", is it executable, who is the owner?
>
[EMAIL PROTECTED]:~$ ls -l /usr/lib/amanda/amindexd
-rwxr-xr-x 1 backup backup 43428 2008-02-04 14:57 /usr/lib/amanda/amindexd

I'm away for the weekend now; catch up on Mnday.

Cheers, Tony.

-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Re: Invalid Service?

2008-04-25 Thread Tony van der Hoff
On 25 Apr at 13:22 "Stefan G. Weichinger" <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> Tony van der Hoff schrieb:
> > Using Amanda 2.5.1p1 under Debian Etch, my backups work fine, and I can
> > recover partitions from tape using dd, etc.
>> 
> > However: [EMAIL PROTECTED]:~$ sudo amrecover HomeDumps AMRECOVER Version
> > 2.5.1p1. Contacting server on localhost ... NAK: amindexd: invalid
> > service
>> 
> > What does this message mean, and how to fix this?
>
> I think it means that you haven't read the docs on how to configure
> (x)inetd correctly.
>
> http://www.amanda.org/docs/install.html#id325457
>
>
http://wiki.zmanda.com/index.php/Quick_start#Configuring_xinetd_on_the_server
>
> Stefan
>
Thanks for taking an interest, Stefan; that's what I thought, too. I wish it
were that simple. Maybe I'm missing something, but what is wrong with this
(3 seperate files, each with the same name as the service):

# default: on
# description: The amanda service
service amanda
{
disable = no
socket_type = dgram
protocol= udp
wait= yes
user= backup
group   = backup
groups  = yes
server  = /usr/lib/amanda/amandad
}


#default: on
# description: The amanda index service
service amandaidx
{
disable = no
socket_type = stream
protocol= tcp
wait= no
user= backup
group   = backup
groups  = yes
server  = /usr/lib/amanda/amindexd
}

#default: on
# description: The amanda tape service
service amidxtape
{
disable = no
socket_type = stream
protocol= tcp
wait= no
user= backup
group   = backup
groups          = yes
server  = /usr/lib/amanda/amidxtaped
}


Oh, and all those paths are valid.

-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Invalid Service?

2008-04-25 Thread Tony van der Hoff
Using Amanda 2.5.1p1 under Debian Etch, my backups work fine, and I can
recover partitions from tape using dd, etc.

However:
[EMAIL PROTECTED]:~$ sudo amrecover HomeDumps
AMRECOVER Version 2.5.1p1. Contacting server on localhost ...
NAK: amindexd: invalid service

What does this message mean, and how to fix this?

Cheers, Tony

-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Re: Amanda configuration

2008-04-08 Thread Tony van der Hoff
On 8 Apr at 11:06 Marc Muehlfeld <[EMAIL PROTECTED]>
wrote in message <[EMAIL PROTECTED]>

> Tony van der Hoff schrieb:
> > Amanda 2.5.1p1
> >
> > tony-lx:~# amrecover HomeDumps -s tony-lx AMRECOVER Version 2.5.1p1.
> > Contacting server on tony-lx ... NAK: amindexd: invalid service
>
> Have a look at the different (x)inetd configuration that came up in 2.5.1:
>
http://wiki.zmanda.com/index.php/Configuring_bsd/bsdudp/bsdtcp_authentication#inetd.conf_example

Hmm, thanks very much, Marc, but that's a bit cryptic.

I added "amandad -auth=bsd amdump amindexd amidxtaped" to my the amanda
entry in inet.conf, but it made no difference to the problem. As I said,
amdump is working correctly.

I would anticipate a problem with the name mismatch: "amindexd" as opposed
to "amandaidx" doesn't seem to tie up...

Thanks anyway, Tony

-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Amanda configuration

2008-04-08 Thread Tony van der Hoff
Amanda 2.5.1p1

I'm trying to recover a file from backup for the first time since I
installed Debian Etch. Evidently something is misconfigured, but I don't
understand the workings sufficiently to figure it out::

tony-lx:~# amrecover HomeDumps -s tony-lx
AMRECOVER Version 2.5.1p1. Contacting server on tony-lx ...
NAK: amindexd: invalid service

My inetd.conf contains the lines:
amanda dgram udp wait backup /usr/sbin/tcpd /usr/lib/amanda/amandad
amandaidx stream tcp nowait backup /usr/sbin/tcpd /usr/lib/amanda/amindexd
amidxtape stream tcp nowait backup /usr/sbin/tcpd /usr/lib/amanda/amidxtaped

from /etc/services:
amanda  10080/tcp   # amanda backup services
amanda  10080/udp
amandaidx   10082/tcp
amidxtape   10083/tcp

My backups seem to be working fine.
Has anyone any advice, please?

-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Re: Do not start Job if label not correct?

2008-04-02 Thread Tony van der Hoff
On 2 Apr at 9:47 Theodotos Andreou <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> Is there a way to tell a Backup job not to start if there is no correct
> label found on the changer? I do not want to use amflush later because
> /amandadumps is too small to host all level 0 images during a monthly
> archival backup.
>

I do this:


#!/bin/bash
#Check tape, and only run backup if successful

DUMP=HomeDumps

/usr/sbin/amcheck -w $DUMP
if [ $? -eq 0 ]
then
#retension tape
mt retension

#run backup for group
/usr/sbin/amdump $DUMP

#verify the tape
echo Verifying ${DUMP}
/usr/sbin/amverify $DUMP
else
echo Failed $DUMP
fi


Customise to suit...
-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Can't open tapedev -- SOLVED

2008-02-04 Thread Tony van der Hoff
On 2 Feb at 23:59 "Dustin J. Mitchell" <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> On Feb 1, 2008 6:38 AM, Tony van der Hoff <[EMAIL PROTECTED]> wrote:
> > Meanwhile, and maybe easier to diagnose, I find:
>>GMT_ONLINE
> > [EMAIL PROTECTED]:~$ sudo ammt -t /dev/nht0 status tapedev /dev/nht0 is
> > offline or has no loaded tape. /dev/nht0 status failed: Success
>>
> > Whereas:
>>
> > [EMAIL PROTECTED]:~$ sudo mt -t /dev/nht0 status drive type = Generic SCSI-2
> > tape drive status = 512 sense key error = 0 residue count = 0 file
> > number = 0 block number = 0 Tape block size 512 bytes. Density code 0x0
> > (default). Soft error count since last status=0 General status bits on
> > (400):
>>  WR_PROT
>>
> > I have attached the strace dumps for all 3 commands. Thanks again for
> > your help.
>
> From the strace, it looks like both applications (ammt and mt) are making
> the same syscalls, but getting different results:
>
> mt: open("/dev/nht0", O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 3 fstat64(3,
> {st_mode=S_IFCHR|0660, st_rdev=makedev(37, 128), ...}) = 0 ioctl(3,
> MGSL_IOCGPARAMS or MTIOCTOP or SNDCTL_MIDI_MPUMODE, 0xbfa50750) = 0
> ioctl(3, MGSL_IOCSTXIDLE or MTIOCGET or SNDCTL_MIDI_MPUCMD, 0xbfa50738) =
> 0
>
> ammt: open("/dev/nht0", O_RDONLY|O_LARGEFILE) = 3 ioctl(3, MGSL_IOCSTXIDLE
> or MTIOCGET or SNDCTL_MIDI_MPUCMD, 0xbf884cd8) = 0
>
> It comes from this code in taper-src/output-tape.c: 
> 537 #ifdef GMT_ONLINE
> 538 if (!GMT_ONLINE(mt.mt_gstat)) { 
> 539 close(ret);
> 540 fprintf(stderr, "tapedev %s is offline or has no loaded
> tape.\n", 
> 541 filename); 
> 542 return -1;
> 543 } 544 #endif /* GMT_ONLINE */
>
> So I think the only conclusion is that something in your config is buggy,
> and MTIOCGET is not returning an "ONLINE" state. Unfortunately, strace
> doesn't give us any insight into the contents of the 'mt' struct.
>
> The new device-src/tape-posix.c does a similar thing:
>
> 145 TapeCheckResult tape_is_ready(int fd) { 
> 146 struct mtget get; 
> 147 if (0 == ioctl(fd, MTIOCGET, &get)) { 
> 148 #if defined(GMT_ONLINE) || defined(GMT_DR_OPEN) 
> 149 if (1 
> 150 #ifdef GMT_ONLINE 
> 151   && GMT_ONLINE(get.mt_gstat) 
> 152 #endif 
> 153 #ifdef GMT_DR_OPEN 
> 154   && !GMT_DR_OPEN(get.mt_gstat) 
> 155 #endif 
> 156 ) { 
> 157   return TAPE_CHECK_SUCCESS; 
> 158 } else { 
> 159 return TAPE_CHECK_FAILURE; 
> 160 } 
> 161 #else /* Neither macro is defined. */ 
> 162 return TAPE_CHECK_UNKNOWN; 
> 163 #endif 
> 164 } else { 
> 165 return TAPE_CHECK_FAILURE; 
> 166 } 
> 167 }
>
> Neither looks obviously incorrect, but I'm not well-versed in the posix
> tape interface.  I think the best trick at this point may be to upgrade
> your kernel and/or tape drivers, but if you're interested in getting
> low-level, you could compile Amanda with debugging symbols (./configure
> ... CFLAGS=-g ...) and then run ammt under gdb, break on tape_tape_open,
> and investigate the contents of the 'mt' struct.  As is always a
> frustration with hardware-related questions, this is not something anyone
> can investigate on your behalf :(
>
> Another solution may be to just delete lines 537-544, recompile, and see
> what happens.

OK, after some digging about, I find the following. Whether it's an Amanda
bug, or a kernel bug, I'll leave to more capable people to decide :)

>From the kernel sources, the Generic Magtape On-Line bit (GMT_ONLINE) is
defined by include/linux/mtio.h. However, this bit is presumably meaningful
for the SCSI tape interface (drivers/scsi/st.c), but has no meaning for the
IDE tape interface (drivers/ide/ide-tape.c), where a tape can't be taken
off-line. Consequently ide-tape.c does not return this flag (st.c does).

Looking at the sources for GNU mt and mt-st, neither makes any assumptions
about GMT_ONLINE, although mt-st (which is the SCSI-enhanced version of mt)
reports it if set.

Amanda, on the other hand, faults it if not set. In view of the kernel's
actions, this is probably a bit over-enthusiastic. It could be argued that
the kernel, having defined the flag in mtio.h, should just return it set for
an IDE tape, which I guess is what the now deprecated ide-scsi interface
did.

My upgrade to a later kernel, and abandoning ide-scsi in favour of ide-tape
has shown up this incompatibility.

My solution was to adopt Dustin's suggestion, and comment out the lines
537-544 in output-tape.c. It worked for me; but obviously a more permanent
fix is required.

Cheers, Tony
-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Re: Fwd: Can't open tapedev

2008-02-03 Thread Tony van der Hoff
On 2 Feb at 23:59 "Dustin J. Mitchell" <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

[snip]
>
> Neither looks obviously incorrect, but I'm not well-versed in the posix
> tape interface.  I think the best trick at this point may be to upgrade
> your kernel and/or tape drivers, but if you're interested in getting
> low-level, you could compile Amanda with debugging symbols (./configure
> ... CFLAGS=-g ...) and then run ammt under gdb, break on tape_tape_open,
> and investigate the contents of the 'mt' struct.  As is always a
> frustration with hardware-related questions, this is not something anyone
> can investigate on your behalf :(
>
> Another solution may be to just delete lines 537-544, recompile, and see
> what happens.

Thanks, Dustin, I'll have a dig around, and let you know whaty I find.

Cheers, Tony
-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Re: Can't open tapedev

2008-01-31 Thread Tony van der Hoff
On 28 Jan at 16:24 "Dustin J. Mitchell" <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> On Jan 28, 2008 10:58 AM, Tony van der Hoff <[EMAIL PROTECTED]> wrote:
> > It seems like everyone here is equally baffled :(
>
> In the interests of getting to the bottom of this, do you think you could
> run an 'strace' the amcheck process?  The results will be long, but if you
> can find the place where it calls open() on the tape device, it will be a
> start.  Please feel free to mail the results to me privately for analysis,
> if you prefer.  I'll post the findings back to the list.

Dustin, on the assumption that you received my strace dump, were you able to
make anything out of it. Is there anything else I can do?

Tony - panicking, having not been able to perform a proper backup for over a
week :(

-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Re: Can't open tapedev

2008-01-28 Thread Tony van der Hoff
On 28 Jan at 14:35 Nick Brockner <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> Tony van der Hoff wrote:
> > Hi,
>> 
> > I've been using amanda for some years, but have just moved from Mandriva
> > to Debian Etch.
>> 
> > I have a Seagate STT-2 IDE Travan tape, which is identified as nht0.
> > MT and dd correctly address this device, and I can read an Amanda tape
> > using dd.
>> 
> > However, amcheck insists that: tapedev /dev/nht0 is offline or has no
> > loaded tape. tape_rdlabel: tape open: /dev/nht0: No such file or
> > directory
>>(expecting tape SysDumps-04 or a new tape)
>> 
> > So clearly I've misconfigured something. I seem to have a vague memory
> > of putting "hdb=ide-scsi" in my kernel command line, and using nst0 but
> > can find no reference to that.
>> 
> > Has anyone got any suggestions please?
>> 
> > Cheers, Tony
>> 
>
> Do a
>
> #modprobe ide-scsi
>
> And see if that loads the kernel module.
>
> -Nick
>

Thanks for the suggestion, Nick; I'm not sure what you expected it to
achieve, but:
# modprobe ide-scsi
FATAL: Module ide_scsi not found.

It seems like everyone here is equally baffled :(
-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Re: Can't open tapedev

2008-01-28 Thread Tony van der Hoff
On 27 Jan at 20:52 "Dustin J. Mitchell" <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> On Jan 27, 2008 1:01 PM, Tony van der Hoff <[EMAIL PROTECTED]> wrote:
> > tape_rdlabel: tape open: /dev/nht0: No such file or directory
>
> Maybe I'm just asking the obvious, but .. does that file exist? Usually
> that error only occurs if the device file itself doesn't exist.
>
> Dustin
>

Ah, Hadn't spotted that Dustin had sent a personal reply as well as posting
to the list (why do this?), so my response went via private mail. 

So for the benefit of continuity on the list:

Well, indeed; thanks for your reply. 

However, I did say, but perhaps wasn't sufficiently clear, mt and dd work
fine with that device, and I have now retrieved an Amandsa backup by that
route. It certainly exists, and works.

Cheers, Tony


-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Can't open tapedev

2008-01-27 Thread Tony van der Hoff
Hi, 

I've been using amanda for some years, but have just moved from Mandriva to
Debian Etch.

I have a Seagate STT-2 IDE Travan tape, which is identified as nht0. MT
and dd correctly address this device, and I can read an Amanda tape using
dd.

However, amcheck insists that:
tapedev /dev/nht0 is offline or has no loaded tape.
tape_rdlabel: tape open: /dev/nht0: No such file or directory
   (expecting tape SysDumps-04 or a new tape)

So clearly I've misconfigured something. I seem to have a vague memory of
putting "hdb=ide-scsi" in my kernel command line, and using nst0 but can
find no reference to that.

Has anyone got any suggestions please? 

Cheers, Tony

-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Re: amrecover fails

2007-10-31 Thread Tony van der Hoff
On 30 Oct at 16:58 Paul Bijnens <[EMAIL PROTECTED]> wrote in
message <[EMAIL PROTECTED]>

[snip]
> > [EMAIL PROTECTED] recover]# amrecover HomeDumps -s tony-lx
> > AMRECOVER Version 2.5.1. Contacting server on tony-lx ...
> > NAK: amindexd: invalid service
> > 
> > amindexd appears to be running; it's certainly configured as per the
> > documentation in xinet.d. 
> > There appears to be no mention of this in either the wiki or the faq.
>
http://wiki.zmanda.com/index.php/Configuring_bsd/bsdudp/bsdtcp_authentication
> 
> Since 2.5.1 you need to add the "services" that amandad is allowed to run
> in the server_args:
> 
> service amanda {
> only_from   = amandasrv.example.com amandaclnt.example.com
> socket_type = dgram
> protocol= udp
> wait= yes
> user= amandabackup
> group   = disk
> groups  = yes
> server  = /usr/lib/amanda/amandad
> server_args = -auth=bsd amdump amindexd amidxtaped
> disable = no

Thanks vey much, Paul; that fixed it! I simply didn't associate my error
message and that change.


A supplementary question for anyone who knows: Is it possible to ger
amrestore to preserve file ownership/permissions, instead of assigning
everything to root?

Cheers, Tony

-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


amrecover fails

2007-10-30 Thread Tony van der Hoff
I'm a long-time Amanda user, currently 2.5.1, under Mandriva 2007, and
regularly perform backups; but have not needed to recover data for some
while. Now I do :(

I'm sure amrecover used to work, but may not have done since I upgraded to
2.5.1. Anyway:

[EMAIL PROTECTED] recover]# amrecover HomeDumps -s tony-lx
AMRECOVER Version 2.5.1. Contacting server on tony-lx ...
NAK: amindexd: invalid service

amindexd appears to be running; it's certainly configured as per the
documentation in xinet.d. 

There appears to be no mention of this in either the wiki or the faq.

Has anyone got any suggestions on what might be wrong, and on how to
overcome this problem?

Cheers, Tony

-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Re: Strange amverify behaviour with amanda 2.4.5

2006-03-12 Thread Tony van der Hoff
Jon LaBadie <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> On Sun, Mar 05, 2006 at 01:11:35PM +0000, Tony van der Hoff wrote:
> > Jon LaBadie <[EMAIL PROTECTED]> wrote in message
> > 
> > > > I did a dump to the holding disk, without a tape mounted, to get the
> > > > image. I then stripped of the first 32k bytes to lose the tape
> > > > header, and tried to untar the rest. That gave a corrupt file error
> > > > in the failing image, but a valid output on non-failing images. I
> > > > conclude that it is the dump that's going wrong before it gets to
> > > > the taper.
> > > 
> > > Seems reasonable.  Did you also use the "z" option (if appropriate)
> > > when untar'ing?  What did the file cmd say about the archive file
> > > after stripping?
> > > 
> > The archive wasn't compressed. Don't understand what you mean by the
> > file cmd, sorry.
> 
> A command named "file".
> 
Posix tar archive.

Anyway, just to close this for the archives, if nothing else, I was forced
to abandon my research on this matter due to other priorities.

However, by specifying all DLEs with compression, I get a clean dump, with a
good amverify. You'll recall that the failing archive was uncompressed. 

This'll do for me, until I get some more time to investigate. I remain
convinced that there is a bug (maybe amanda; possibly in GNU/tar) causing
this problem. My guess is that not many people use uncompressed GNU/tar
archives...

Thanks again, everyone on the list, for your help.
-- 
Tony van der Hoff  | mailto:[EMAIL PROTECTED]
Buckinghamshire, England


Re: Strange amverify behaviour with amanda 2.4.5

2006-03-05 Thread Tony van der Hoff
Jon LaBadie <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> On Sat, Mar 04, 2006 at 05:50:16PM +0000, Tony van der Hoff wrote:

> > Not sure how to go about finding the exact command. Fortunately, this
> > DLE has no exclusions.
> > 
> I think the file to check is in your debug dir (/tmp/amanda here, YMMV).
> Been a while, but I think it will be in runtar.??? or sendbackup.???.
> 
Yes, found them. I'm afraid I'm not clever enough to do anything sensible
with them. There are two runtar files, one which appears to send the gnutar
output to /dev/null, presumably that's when it does the size estimate, and
the second sends the output to stdout; I would guess it's part of a pipe
where amanda adds the header.

I tried directing the latter at a real file, but just got an empty archive.
> 
> When you try it by hand, be sure to set your environment as close as
> possible to the way amdump would be when it runs.
> 
Hmm, yes, well, I guess I failed :(

> > I did a dump to the holding disk, without a tape mounted, to get the
> > image. I then stripped of the first 32k bytes to lose the tape header,
> > and tried to untar the rest. That gave a corrupt file error in the
> > failing image, but a valid output on non-failing images. I conclude that
> > it is the dump that's going wrong before it gets to the taper.
> 
> Seems reasonable.  Did you also use the "z" option (if appropriate) when
> untar'ing?  What did the file cmd say about the archive file after
> stripping?
> 
The archive wasn't compressed. Don't understand what you mean by the file
cmd, sorry.

> > I then did a gtar on the failing directory, without amdump's
> > involvement. This was successful.
> 
> Perhaps when mimic'ing amanda options things will be different.
> 
> If not, perhaps an analysis of a hand made tar and an amdump made archive
> would be useful.  Nice that it is a small DLE.
> 
> 


-- 
Tony van der Hoff  | mailto:[EMAIL PROTECTED]
Buckinghamshire, England


Re: Strange amverify behaviour with amanda 2.4.5

2006-03-04 Thread Tony van der Hoff
Jon LaBadie <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

[snip]
> Clarification please.  Does it always seem corrupted on the first taped
> image? Is that the only corrupted image.  Is that first image always the
> same DLE.
> 
No, it is a specific directory (/boot). If I exclude it from the dump, all
is well. If I include something else (smaller, so it appears first) in the
dump, then that is verified, before things go awry.

> Reason I ask is to check if a manual dump of a DLE that consistantly
> corrupts could be used to confirm that it can be dumped successfully
> outside of amanda. Find the exact command line and try running it.  Don't
> forget to build an exclude file. :)
> 
Not sure how to go about finding the exact command. Fortunately, this DLE
has no exclusions.

I did a dump to the holding disk, without a tape mounted, to get the image.
I then stripped of the first 32k bytes to lose the tape header, and tried to
untar the rest. That gave a corrupt file error in the failing image, but a
valid output on non-failing images. I conclude that it is the dump that's
going wrong before it gets to the taper.

I then did a gtar on the failing directory, without amdump's involvement.
This was successful.

> BTW amverify may not be doing all that much.  The dump programs are
> specific to the clients and may not be available on the tapehost.  In that
> case all amverify can do is see that the tape is readable.
> 
In this case the tapehost and the client are one and the same. 
There is an instruction in amverify that reads
RESULT=`$AMRESTORE -h -p $DEVICE 2> $TEMP/amrestore.out \
| doonefile 2> $TEMP/onefile.errors`
amverify enters this, but doesn't exit. It seems to have hung in amrestore.
Unfortunately, I haven't been able to find my way around amrestore
sufficiently to find out exactly what's happening. 
Of course, this is a secondary problem, but I don't think it's very nice for
amrestore to die silently on a corupt image.

I then tried to find my way around amdump, to find the cause of the initial
problem, but I'm afraid I got totally lost, and life demanded that I turned
my attention elsewhere :(

-- 
Tony van der Hoff  | mailto:[EMAIL PROTECTED]
Buckinghamshire, England


Re: Strange amverify behaviour with amanda 2.4.5

2006-03-04 Thread Tony van der Hoff
Gene Heskett <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> On Tuesday 28 February 2006 09:25, Tony van der Hoff wrote:
> > Gene Heskett <[EMAIL PROTECTED]> wrote in message
> > <[EMAIL PROTECTED]>
> >
> > [snip]
> >
> > > And at this point, I am lost.  I'm not familiar with the syntax you
> > > are using for the excludes specification, particularly the "*" of that
> > > spec as you are using it.  No idea if thats something new or what.
> > > I've never used such here as I A: use "exclude filename" named in the
> > > dumptype, and B: have since I learned about it, used the "./name"
> > > formats in those files. [snip]
> >
> > Thanks, Jon and Gene :)
> >
> > I'll make those changes to the config files as you suggest, I might as
> > well get it right. I feel like it's grasping at staws, though; this
> > config has been working for 3 years :(
> 
> But, has it been doing exactly as you expected?  A recovery to /tmp might
> be in interesting, just to see what comes back.  I have a hunch its been
> getting more than you intended.

OK, I've been doing some more research. I didn't think I'd just dreamt up
that * syntax :)

As I understand it, Amanda passes the exclude file name on to GNU-tar (man
amanda):
exclude [ list|file ][[optional][ append ][  string ]+]
Default: file. There are two exclude lists, exclude file and ex-
clude  list. With exclude file , the string is a GNU-tar exclude
expression. With exclude list , the string is a file name on the
client containing GNU-tar exclude expressions.
All  exclude expressions are concatenated in one file and passed
to GNU-tar as an --exclude-from argument.

Now GNU-tar accepts wildcards in the exclude list, unless the switch
--no-wildcards is specified. Amanda's not doing that. 
>From man tar:
-X, --exclude-from=FILE
exclude patterns listed in FILE
note _patterns_

I would conclude that what I am doing is quite legitimate, and should
achieve my desired action, that is to exclude all 'tmp' directories, i.e. in
the /usr disk list, not just /usr/tmp (which would be specified by the
suggested ./tmp syntax), but also /usr/local/tmp, and others further town
the hierarchy.

On the other hand, it does look like you are quite correct in pointing out
that the exclude /var/spool syntax is wrong. There is no way that would
match anything, and the point about my backing up /var/www twice is well
made :)

So, I've fixed those disk lists, and did another amdump, followed by an
amverify. Same result: amverify hangs/crashes seemingly at the end of tape,
without any meaningful report. So I think the disk list problems are a bit
of a red herring.

I then did some dd restores for all the DLEs on the tape, and it turns out
that the very first image is corrupt, causing GNU tar (1.15.1) to abort with
an error. However, amverify doesn't spot this, and happily extracts
everything from the tape, piping it into thin air, until it reaches EoT,
after which it simply hange.

I've been trying, with little success so far, to figure out why this
particular image is corrupt; it is absolutely repeatable on successive
amdump runs, but the disk directory seems OK. Can anyone point me at the
code that creates the image, please.



-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Re: Strange amverify behaviour with amanda 2.4.5

2006-02-28 Thread Tony van der Hoff
Gene Heskett <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

[snip]
> 
> And at this point, I am lost.  I'm not familiar with the syntax you are
> using for the excludes specification, particularly the "*" of that spec as
> you are using it.  No idea if thats something new or what.  I've never
> used such here as I A: use "exclude filename" named in the dumptype, and
> B: have since I learned about it, used the "./name" formats in those
> files.
>[snip]

Thanks, Jon and Gene :)

I'll make those changes to the config files as you suggest, I might as well
get it right. I feel like it's grasping at staws, though; this config has
been working for 3 years :(


-- 
Tony van der Hoff  | mailto:[EMAIL PROTECTED]
Buckinghamshire, England


Re: Strange amverify behaviour with amanda 2.4.5

2006-02-27 Thread Tony van der Hoff
On 27 Feb, in message <[EMAIL PROTECTED]>, you
wrote:

> On Monday 27 February 2006 07:03, Tony van der Hoff wrote:
> > Having, apparently successfully, performed an amdump, consisting of
> > several DLEs, I run amverify on the same tape.
> >
> > amverify finds the first DLE image, and reports that is is OK. However,
> > it then continues to run, presumably to the end of tape, but without
> > reporting any other images. It then hangs, with the tape drive
> > indicating busy. I have to manually kill the amverify process to regain
> > control over the tape drive.
> >
> >
> > My setup has, in the past, worked fine, and in fact still does using an
> > amdump/amverify configuration with different DLEs. I recently upgraded
> > to kernel 2.6.12.
> 
> The kernel shouldn't be a factor, currently running 2.6.16-rc5 here. Yeah,
> I have spare blood. :)
> 
Well, that's the only thing that's changed recently, so I thought I'd
mention it.

> Could we see a disklist entry that works, and one that doesn't please?
> 
Yep, I was hoping to avoid cluttering the list with useless garbage :)

This works:
-
define dumptype user-tar {
comment "user partitions dumped with tar"
global
program "GNUTAR"
compress none
exclude file optional append "*/recover*"
exclude file optional append "*/restore*"
exclude file optional append "*/download"
priority medium
dumpcycle 0
}

define dumptype comp-user-tar {
user-tar
compress client fast
}

tony-lx /home   comp-user-tar
tony-lx /cvsrootcomp-user-tar


resulting in:

These dumps were to tape HomeDumps-05.
The next tape Amanda expects to use is: HomeDumps-06.


STATISTICS:
  Total   Full  Incr.
      
Estimate Time (hrs:min)0:01
Run Time (hrs:min) 0:37
Dump Time (hrs:min)0:33   0:33   0:00
Output Size (meg)1658.9 1658.90.0
Original Size (meg)  4317.3 4317.30.0
Avg Compressed Size (%)38.4   38.4-- 
Filesystems Dumped2  2  0
Avg Dump Rate (k/s)   846.1  846.1-- 

Tape Time (hrs:min)0:34   0:34   0:00
Tape Size (meg)  1658.9 1658.90.0
Tape Used (%)  18.9   18.90.0
Filesystems Taped 2  2  0
Avg Tp Write Rate (k/s)   837.1  837.1-- 

USAGE BY TAPE:
  Label  Time  Size  %Nb
  HomeDumps-05   0:34  1698734k   18.9 2

 
NOTES:
  taper: tape HomeDumps-05 kb 1698848 fm 2 [OK]

 
DUMP SUMMARY:
 DUMPER STATSTAPER STATS 
HOSTNAME DISKL ORIG-kB OUT-kB COMP% MMM:SS  KB/s MMM:SS  KB/s
-- - 
tony-lx  /cvsroot0   13100   5223  39.9   0:022326.1   0:23 229.7
tony-lx  /home   0 44078401693511  38.4  33:25 844.5  33:27 844.0

(brought to you by Amanda version 2.4.5)

--
verified as:

Tapes:  HomeDumps-05
No errors found!

amverify HomeDumps
Mon Feb 27 02:36:48 GMT 2006

Using device /dev/nst0
Volume HomeDumps-05, Date 20060227
Checked tony-lx._cvsroot.20060227.0
Checked tony-lx._home.20060227.0
End-of-Tape detected.

-
This fails:

define dumptype root-tar {
global
program "GNUTAR"
comment "root partitions dumped with tar"
compress none
exclude file optional append "*/tmp"
priority low
dumpcycle 0
}

define dumptype comp-root-tar {
root-tar
comment "Root partitions with compression"
compress client best
}

define dumptype comp-var-tar {
root-tar
comment "var partitions with compression"
compress client best
#exclude list "/usr/local/etc/amanda/SysDumps/exclude"
exclude file optional append "/var/spool"
}

tony-lx /binroot-tar
tony-lx /boot   root-tar
tony-lx /etccomp-root-tar
tony-lx /libroot-tar
#tony-lx/root   comp-root-tar
tony-lx /sbin   root-tar
tony-lx /usrcomp-root-tar
tony-lx /usr/local  comp-root-tar
tony-lx /varcomp-var-tar
tony-lx /var/wwwcomp-var-tar

--
resulting in:

Re: Strange amverify behaviour with amanda 2.4.5

2006-02-27 Thread Tony van der Hoff
On 27 Feb, in message <[EMAIL PROTECTED]>, you
wrote:

> On Monday 27 February 2006 07:03, Tony van der Hoff wrote:
> > Having, apparently successfully, performed an amdump, consisting of
> > several DLEs, I run amverify on the same tape.
> >
> > amverify finds the first DLE image, and reports that is is OK. However,
> > it then continues to run, presumably to the end of tape, but without
> > reporting any other images. It then hangs, with the tape drive
> > indicating busy. I have to manually kill the amverify process to regain
> > control over the tape drive.
> >
> >
> > My setup has, in the past, worked fine, and in fact still does using an
> > amdump/amverify configuration with different DLEs. I recently upgraded
> > to kernel 2.6.12.
> 
> The kernel shouldn't be a factor, currently running 2.6.16-rc5 here. Yeah,
> I have spare blood. :)
> 
Well, that's the only thing that's changed recently, so I thought I'd
mention it.

> Could we see a disklist entry that works, and one that doesn't please?
> 
Yep, I was hoping to avoid cluttering the list with useless garbage :)

This works:
-
define dumptype user-tar {
comment "user partitions dumped with tar"
global
program "GNUTAR"
compress none
exclude file optional append "*/recover*"
exclude file optional append "*/restore*"
exclude file optional append "*/download"
priority medium
dumpcycle 0
}

define dumptype comp-user-tar {
user-tar
compress client fast
}

tony-lx /home   comp-user-tar
tony-lx /cvsrootcomp-user-tar


resulting in:

These dumps were to tape HomeDumps-05.
The next tape Amanda expects to use is: HomeDumps-06.


STATISTICS:
  Total   Full  Incr.
      
Estimate Time (hrs:min)0:01
Run Time (hrs:min) 0:37
Dump Time (hrs:min)0:33   0:33   0:00
Output Size (meg)1658.9 1658.90.0
Original Size (meg)  4317.3 4317.30.0
Avg Compressed Size (%)38.4   38.4-- 
Filesystems Dumped2  2  0
Avg Dump Rate (k/s)   846.1  846.1-- 

Tape Time (hrs:min)0:34   0:34   0:00
Tape Size (meg)  1658.9 1658.90.0
Tape Used (%)  18.9   18.90.0
Filesystems Taped 2  2  0
Avg Tp Write Rate (k/s)   837.1  837.1-- 

USAGE BY TAPE:
  Label  Time  Size  %Nb
  HomeDumps-05   0:34  1698734k   18.9 2

 
NOTES:
  taper: tape HomeDumps-05 kb 1698848 fm 2 [OK]

 
DUMP SUMMARY:
 DUMPER STATSTAPER STATS 
HOSTNAME DISKL ORIG-kB OUT-kB COMP% MMM:SS  KB/s MMM:SS  KB/s
-- - 
tony-lx  /cvsroot0   13100   5223  39.9   0:022326.1   0:23 229.7
tony-lx  /home   0 44078401693511  38.4  33:25 844.5  33:27 844.0

(brought to you by Amanda version 2.4.5)

--
verified as:

Tapes:  HomeDumps-05
No errors found!

amverify HomeDumps
Mon Feb 27 02:36:48 GMT 2006

Using device /dev/nst0
Volume HomeDumps-05, Date 20060227
Checked tony-lx._cvsroot.20060227.0
Checked tony-lx._home.20060227.0
End-of-Tape detected.

-
This fails:

define dumptype root-tar {
global
program "GNUTAR"
comment "root partitions dumped with tar"
compress none
exclude file optional append "*/tmp"
priority low
dumpcycle 0
}

define dumptype comp-root-tar {
root-tar
comment "Root partitions with compression"
compress client best
}

define dumptype comp-var-tar {
root-tar
comment "var partitions with compression"
compress client best
#exclude list "/usr/local/etc/amanda/SysDumps/exclude"
exclude file optional append "/var/spool"
}

tony-lx /binroot-tar
tony-lx /boot   root-tar
tony-lx /etccomp-root-tar
tony-lx /libroot-tar
#tony-lx/root   comp-root-tar
tony-lx /sbin   root-tar
tony-lx /usrcomp-root-tar
tony-lx /usr/local  comp-root-tar
tony-lx /varcomp-var-tar
tony-lx /var/wwwcomp-var-tar

--
resulting in:

Strange amverify behaviour with amanda 2.4.5

2006-02-27 Thread Tony van der Hoff
Having, apparently successfully, performed an amdump, consisting of several
DLEs, I run amverify on the same tape.

amverify finds the first DLE image, and reports that is is OK. However, it
then continues to run, presumably to the end of tape, but without reporting
any other images. It then hangs, with the tape drive indicating busy. I have
to manually kill the amverify process to regain control over the tape drive.


My setup has, in the past, worked fine, and in fact still does using an
amdump/amverify configuration with different DLEs. I recently upgraded to
kernel 2.6.12.

Using mt and dd shows that all images are present and readable on the tape,
and the amanda end-of-tape marker is present.

Has anyone any suggestions as to what may be wrong?
-- 
Tony van der Hoff  | mailto:[EMAIL PROTECTED]
Buckinghamshire, England


Re: WARNING: tapecycle (6) <= runspercycle (6).

2006-01-07 Thread Tony van der Hoff
Ian Turner <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> On Saturday 07 January 2006 01:17 pm, Tony van der Hoff wrote:
> > I am certainly not overwriting my last dump; in fact I have 5
generations
> > of dump :)
> 
> If you are doing a full dump everyday, then set your dumpcycle to 1 day,
> and your runspercycle to 1.
> 
Ahh, right, now I get it; thanks.

[snip]
> 

-- 
Tony van der Hoff  | mailto:[EMAIL PROTECTED]
Buckinghamshire, England


Re: WARNING: tapecycle (6) <= runspercycle (6).

2006-01-07 Thread Tony van der Hoff
Ian Turner <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> On Saturday 07 January 2006 12:38 pm, Tony van der Hoff wrote:
> > WARNING: tapecycle (6) <= runspercycle (6).
> 
> What this means, is that if a dump ever fails (bad tape, network problems,

> etc.), there is a chance that you will have no backup at all.
> 
> If tapecycle == dumpcycle, then you are overwriting your very last dump
> each time, which is not very safe. Better to have tapecycle be at least
> double dumpcycle, so that you have a spare backup if the one you are
> erasing has any problem.
> 

Thanks, Ian, that makes sense. Something's evidently awry. 

I have 6 tapes, HomeDumps_01 -> HomeDumps_06. Each day, Mon-Sat, I run
HomeDumps with a different tape, repeating that the following week. amverify
correctly asks me for the appropriate tape each day, before coming out with
the warning. 

My amanda.conf includes:
dumpcycle 1 weeks
runspercycle 6  # each weekday
tapecycle 6 tapes   # one for each day

Which of these should I change?

I am certainly not overwriting my last dump; in fact I have 5 generations of
dump :)

Oh, and don't bother to post both to me AND to the list; just one will do :)

-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


WARNING: tapecycle (6) <= runspercycle (6).

2006-01-07 Thread Tony van der Hoff

Since I upgraded amanda, whenever I run amverify, I get the message
WARNING: tapecycle (6) <= runspercycle (6).

What does this mean, what is its significance, should I be concerned?

I have 6 tapes which are rotated daily for runs on Mon-Sat.

Cheers, Tony

-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Suppressin AMVerify output

2005-11-17 Thread Tony van der Hoff
Hi,

I have a cron script which runs nightly, performing an amdump, followed by
amverify. Both work fine, except that I get an unexpected message from
amverify:

The expected mail message gets sent from the amanda user to my mailbox:
---
Tapes:  HomeDumps-04
No errors found!

amverify HomeDumps
Thu Nov 17 02:35:22 GMT 2005

Using device /dev/nst0
Volume HomeDumps-04, Date 20051117
Checked tony-lx._cvsroot.20051117.0
Checked tony-lx._home.20051117.0
End-of-Tape detected.
---

But, in addition, I get a message from cron:
---
No tape changer...
Tape device is /dev/nst0...
Verify summary to tony
Defects file is /tmp/amanda/amverify.25355/defects
amverify HomeDumps
Thu Nov 17 02:35:22 GMT 2005

Using device /dev/nst0
Volume HomeDumps-04, Date 20051117
Checked tony-lx._cvsroot.20051117.0
Checked tony-lx._home.20051117.0
End-of-Tape detected.
---

This suggests that amverify is writing to stdout/stderr as well as to the
mail message, which really is tortologous. 

This only seems to have started happening since I upgraded to amanda 2.4.5.
So, what is the significance of this message, and how do I suppress it?

Cheers, Tony
-- 
Tony van der Hoff  | mailto:[EMAIL PROTECTED]
Buckinghamshire, England


Re: libintl

2005-09-21 Thread Tony van der Hoff
Matt Hyclak <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> On Wed, Sep 21, 2005 at 06:21:32PM +0100, Tony van der Hoff enlightened
> us:
> > I recently updated my linux distro from Mandrake 10.1 to 10.2. Rather
> > foolishly, I decided to upgrade Amanda from 2.4.4 to 2.4.5 at the same
> > time. [I know - only change one thing at a time :( ]
> > 
> > Anyway, the result was that Amanda would no longer work, with the
> > dreaded "selfcheck request timed out". Finally, after much pulling out
> > of hair, I tracked down the cause to amandad not starting, because of a
> > dependancy on libintl.so.2, while the new distro only provides
> > libintl.so.3. As a quick fix, I symlinked .2 to .3, and got Amanda
> > working.
> > 
> > Question: why this dependance on a rather ancient (2003) library? Will
> > it hurt to stick with the symlink, or should I obtain a .2 library?
> 
> How did you install amanda? If it was a pre-built RPM, then chances are
> that the build machine had libintl.so.2 on it. This is a good argument for
> building your own amanda either from source or via SRPMs.
> 
Indeed; I built it from source...

-- 
Tony van der Hoff  | mailto:[EMAIL PROTECTED]
Buckinghamshire, England


libintl

2005-09-21 Thread Tony van der Hoff
I recently updated my linux distro from Mandrake 10.1 to 10.2. Rather
foolishly, I decided to upgrade Amanda from 2.4.4 to 2.4.5 at the same time.
[I know - only change one thing at a time :( ]

Anyway, the result was that Amanda would no longer work, with the dreaded
"selfcheck request timed out". Finally, after much pulling out of hair, I
tracked down the cause to amandad not starting, because of a dependancy on
libintl.so.2, while the new distro only provides libintl.so.3. As a quick
fix, I symlinked .2 to .3, and got Amanda working.

Question: why this dependance on a rather ancient (2003) library? Will it
hurt to stick with the symlink, or should I obtain a .2 library?

-- 
Tony van der Hoff  | mailto:[EMAIL PROTECTED]
Buckinghamshire, England


Re: Restoring without Amanda

2005-09-07 Thread Tony van der Hoff
Jon LaBadie <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> On Wed, Sep 07, 2005 at 10:32:47AM -0400, Joshua Baker-LePain wrote:
> > On Wed, 7 Sep 2005 at 10:03am, Vytas Janusauskas wrote
> > 
> > > So I:
> > >   mt -t /dev/nst0 rewind
> > >   mt -t /dev/nst0 fsf 2
> > > dd if=/dev/nst0 bs=32k count=1
> > > 
> > > This list the following:
> > > 
> > >   AMANDA: FILE 20050304 dendron.l8r.net /mnt/vxa2/scans/c/Seven_Unix
lev 0 
> > > comp .gz program /bin/tar
> > > To restore, position tape at start of file and run:
> > >  dd if= bs=32k skip=1 | /bin/gzip -dc | bin/tar -f... -
> > > 

step 1

> > > So I rewind the tape skip 2 files and then issue:
> > > 
> > > dd if=/dev/nst0 bs=32k skip=1 | /bin/gzip -dc | /bin/gtar -f  
> > 
> > dd if=/dev/nst0 bs=32k skip=1 | /bin/gzip -dc | /bin/gtar -f -
> > 
> > Note the trailing hyphen, which tells tar to read from stdin.
> 
> 
> Vytas, Tony,
> 
> Would the header message have been any clearer if it said
> 
>dd if= bs=32k skip=1 | /bin/gzip -dc | bin/tar -...f -
> 
> or maybe
> 
> dd if= bs=32k skip=1 | /bin/gzip -dc | bin/tar - -f -
> 

yes, personally, I had no problem with the hyphen, but ...

I posted last week that my confusion had arisen out of the "skip=1", having
located the required archive. The need to rewind and skip 2 files in this
case could have been avoided at step 1 above. Now *that* would make a
difference.

Cheers, Tony
-- 
Tony van der Hoff  | mailto:[EMAIL PROTECTED]
Buckinghamshire, England


Re: Restoring without Amanda

2005-09-07 Thread Tony van der Hoff
Vytas Janusauskas <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> Hi  All,
> 
> I had a failure of my Amanda index drive.  I am now trying to restore some

> archives.  What I have done so far is the following:
> 
> Ran amrestore to get a listing of tape contents
> dendron:/mnt/dump_drive/restore# mt -t /dev/nst0 rewind
> dendron:/mnt/dump_drive/restore# amrestore /dev/nst0 no.such.host
> amrestore:   0: skipping start of tape: date 20050304 label Project223
> amrestore:   1: skipping 
> dendron.l8r.net._mnt_vxa2_scans_c_Seven__Pent22.20050304.0
> amrestore:   2: skipping 
> dendron.l8r.net._mnt_vxa2_scans_c_Seven__Unix.20050304.0
> amrestore:   3: skipping 
> dendron.l8r.net._mnt_vxa2_scans_c_Seven__Pent21.20050304.0
> amrestore:   4: skipping 
> dendron.l8r.net._mnt_vxa2_scans_c_Seven__Final__Sids.20050304.0
> amrestore: could not fsf /dev/nst0: Input/output error
> 
> determined that what I need is in file 
> 2:   dendron.l8r.net._mnt_vxa2_scans_c_Seven__Unix.20050304.0
> 
> So I:
>   mt -t /dev/nst0 rewind
>   mt -t /dev/nst0 fsf 2
> dd if=/dev/nst0 bs=32k count=1
> 
> This list the following:
> 
>   AMANDA: FILE 20050304 dendron.l8r.net /mnt/vxa2/scans/c/Seven_Unix lev 0

> comp .gz program /bin/tar
> To restore, position tape at start of file and run:
>  dd if= bs=32k skip=1 | /bin/gzip -dc | bin/tar -f... -
> 
> So I rewind the tape skip 2 files and then issue:
> 
> dd if=/dev/nst0 bs=32k skip=1 | /bin/gzip -dc | /bin/gtar -f  
> 
> I tried various things as substitutes for   such as 
> /mnt/vxa2/scans/c/Seven_Unix and
>dendron.l8r.net._mnt_vxa2_scans_c_Seven__Pent22.20050304.0
> 
[snip]

Ha! I asked exactly the same thing last week. You should try the archives!

Anyway, the dash at the end of the command is significant; it means to take
the gtar input from stdin (i.e. the pipe). It'll expand the archive into the
current directory. No file names required.

I used ... gtar -xpvf -

-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Re: Help restoring

2005-08-30 Thread Tony van der Hoff
Jon LaBadie <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> On Thu, Aug 25, 2005 at 07:43:53PM +0100, Tony van der Hoff wrote:
> > I'm trying to recover my /etc directory from tape, so in accordance with
> > docs/RESTORE, I'm doing this:
> > 
> > [EMAIL PROTECTED] etc]# mt fsf 1 && dd if=/dev/tape bs=32k count=1
> > AMANDA: FILE 20050821 tony-lx /etc lev 0 comp .gz program /bin/gtar
> > To restore, position tape at start of file and run:
> >dd if= bs=32k skip=1 | /bin/gzip -dc | bin/gtar -f... -
> > 
> > 
> > 1+0 records in
> > 1+0 records out
> > [EMAIL PROTECTED] etc]# dd if=/dev/tape bs=32k skip=1 | /bin/gzip -dc |
> > /bin/gtar -xpvf -
> > 
> > gzip: stdin: not in gzip format
> > 2+0 records in
> > 1+0 records out
> > 
> > And, of course nothing in my restore/etc dir. I hope it's just my
> > incompetence :( 
> > 
> 
> 
> Those two command sequences can not be run one after the other.
> Each assumes the tape is as the same starting position.  After
> positioning the tape to the beginning of a tape file, the first
> command looks at the first block of the tape file.  The second
> command, if started from the same beginning of a tape file,
> skips over the first block (the one read by the first command).
> But if the tape is not at the beginning of the file you either
> don't need to skip anything, or you have to rewind and reposition
> to the beginning of the tape file.
> 
> BTW, I think the device you are using "/dev/tape" is the rewind
> on close device.  Thus after the first dd ... count=1 command
> the tape probably rewinds to the beginning of the tape.
> /dev/ntape is likely the "leave the tape where it is" device.
> 

My sincere thanks to everyone who took the time to reply. As suggested, it
was the 'skip=1' instruction that caused the trouble. Omitting this in the
dd solved it. Stangely, I had already tried a "mt bsf 1" with the aim of
positioning the tape correctly, but that failed to improve matters.
Possibly, I was by then so confused that I messed it up.

As to the other suggestions, my /dev/tape ls symlinked to /dev/nst0, so is
not rewinding. I'm running Mandrake Linux 10.2 here. I created a seperate
/restore/etc directory, in which to restore /etc.

I think my initial confusion arose out of the suggestion from Amanda:
> > To restore, position tape at start of file and run:
> >dd if= bs=32k skip=1 | /bin/gzip -dc | bin/gtar -f... -
In fact,
    To restore, run: 
dd if= bs=32k | /bin/gzip -dc | bin/gtar -f... -
would maybe have been more helpful and less verbose at this point. 

I guess I should have figured out which 'start of file' to position to, but
failed :-(

Anyway, thanks again.

-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Help restoring

2005-08-26 Thread Tony van der Hoff
I'm trying to recover my /etc directory from tape, so in accordance with
docs/RESTORE, I'm doing this:

[EMAIL PROTECTED] etc]# mt fsf 1 && dd if=/dev/tape bs=32k count=1
AMANDA: FILE 20050821 tony-lx /etc lev 0 comp .gz program /bin/gtar
To restore, position tape at start of file and run:
   dd if= bs=32k skip=1 | /bin/gzip -dc | bin/gtar -f... -


1+0 records in
1+0 records out
[EMAIL PROTECTED] etc]# dd if=/dev/tape bs=32k skip=1 | /bin/gzip -dc |
/bin/gtar -xpvf -

gzip: stdin: not in gzip format
2+0 records in
1+0 records out

And, of course nothing in my restore/etc dir. I hope it's just my
incompetence :( 

Any suggestions, please?

-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 



Re: Amrecover authorisation

2005-07-27 Thread Tony van der Hoff
Matt Hyclak <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> On Tue, Jul 26, 2005 at 04:55:18PM +0100, Tony van der Hoff enlightened
us:
> > Help!
[snip]
> 
> Reading the error message would indicate you also need 
> 
> localhost root
> 
> in your amandahosts
> 

Thank you very much. Matt, you've saved me from hordes of angry users! My
server's up and running again, restored from the backups.
-- 
Tony van der Hoff| mailto:[EMAIL PROTECTED]
Buckinghamshire, England 


Amrecover authorisation

2005-07-26 Thread Tony van der Hoff
Help!

Due to some finger trouble, I have contrived to lose some important files,
including configuration, from my server.

The good news is that I have a recent backup on tape, but when I try to
invoke amrecover, i get errors:

[EMAIL PROTECTED] /]# amrecover SysDumps -d /dev/tape
AMRECOVER Version 2.4.4p1. Contacting server on tony-lx.magpieway.net ...
220 tony-lx AMANDA index server (2.4.4p1) ready.
500 Access not allowed: [access as amanda not allowed from [EMAIL PROTECTED]
amandahostsauth failed

My amandahosts contains 
tony-lx.magpieway.net amanda
tony-lx.magpieway.net root

I'm pretty sure this used to work when I put it to the test, so I imagine
something has become corrupted, somewhere.

Any hints would be welcome!
 
-- 
Tony van der Hoff | mailto:[EMAIL PROTECTED]
Buckinghamshire, England


Re: authorisation failure

2004-07-01 Thread Tony van der Hoff
Joshua Baker-LePain <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

[snip]

OK, it turnes out that the entry in .amandahosts now (since the upgrade)
requires the FQDN for tony-lx, i.e. tony-lx.magpieway.net. It now works. I
can't be bothered to chase this right through, but I suspect something has
changed in the way NIS is working.

Thanks for the pointer.

Cheers, Tony.

-- 
Tony van der Hoff   | mailto:[EMAIL PROTECTED]
Buckinghamshire England


Re: authorisation failure

2004-06-30 Thread Tony van der Hoff
Joshua Baker-LePain <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> On Wed, 30 Jun 2004 at 4:29pm, Tony van der Hoff wrote
> 
> > I've just upgraded my Mandrake 9.1 (under which I've had Amanda working
> > perfectly for many moons) to Mandrake 10.0. Amanda planner is now
failing:
> > 
> > FAILURE AND STRANGE DUMP SUMMARY:
> >   planner: ERROR tony-lx:  [access as amanda not allowed from
> > [EMAIL PROTECTED] amandahostsauth failed
> > 
> > I can't immediately find the solution in the docs, so can someone please
> > point me in the right direction for fixing trhis problem?
> 
> This is probably in FAQ-O-MATIC, and certainly in the mailing list 
> archives.  You need to have an entry in .amandahosts in the amanda user's 
> $HOME on the server that looks like this (given the above error message):
> 
> tony-lx amanda
> 

Thanks, Joshua, for both your messages. There is really no need to respond
to both the list and directly. As I said, I've had Amanda working fine under
Mandrake 9.1, it was the upgrade to 10.0 that caused the problem. And, yes,
when I mentioned the docs, I did include FAQ-O-MATIC, and the archives.

Indeed I have that entry (and one for root, to allow amrecover) in
.amandahosts. However, you did give me cause to ensure that it was there :-)

Does anyone have any other suggestions?

-- 
Tony van der Hoff   | mailto:[EMAIL PROTECTED]
Buckinghamshire England


authorisation failure

2004-06-30 Thread Tony van der Hoff
Hi,

I've just upgraded my Mandrake 9.1 (under which I've had Amanda working
perfectly for many moons) to Mandrake 10.0. Amanda planner is now failing:

FAILURE AND STRANGE DUMP SUMMARY:
  planner: ERROR tony-lx:  [access as amanda not allowed from
[EMAIL PROTECTED] amandahostsauth failed

I can't immediately find the solution in the docs, so can someone please
point me in the right direction for fixing trhis problem?

TIA, Tony

-- 
Tony van der Hoff   | mailto:[EMAIL PROTECTED]
Buckinghamshire England


Re: Joe Harpole/St Louis/IBM is out of the office.

2004-06-02 Thread Tony van der Hoff
Joe Harpole <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> 
> 
> 
> 
> I will be out of the office starting  06/02/2004 and will not return until
> 06/03/2004.
> 
> I'll be out of the office Monday & Tuesday for Mom's Cardiac Cath test and
> possible surgery.
> 

Just what we all wanted to know...

-- 
Tony van der Hoff   | mailto:[EMAIL PROTECTED]
Buckinghamshire England


Re: Connection refused

2004-05-17 Thread Tony van der Hoff
Tony van der Hoff <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> Frank Smith <[EMAIL PROTECTED]> wrote in message
> <[EMAIL PROTECTED]>
> 
> > --On Tuesday, May 11, 2004 17:22:28 +0100 Tony van der Hoff
> <[EMAIL PROTECTED]> wrote:
> > 
> > > Hi,
> > > 
> > > I have successfully installed and configured Amanda, and amcheck runs
> > > successfully, as does amdump.
> > > 
> > > However, amrecover (running as root) fails, with the message "cannot
> > > connect to tony-lx.magpieway.net: connection refused"
> > > 
> > > .amandahosts contains tony-lx.magpieway.net, which is the localhost,
> > > as well as the tape server, which user amanda can happily access to do
> > > the backups.
> > > 
> > > Evidently this is a permissions problem with root, but can anyone
> > > point me in the right direction to fix it? Runnig Mandrake 9.1.
> > 
> > Do you have amindexd and amidxtaped configured in (x)inetd on the tape
> > server? They aren't needed for backups, but are for restores.
> >'connection refused' usually indicates a service isn't running, or
> > possibly firewall problems, .amandahosts problems generally give you an
> > 'access as foo not allowed..' message.
> > 
> 
> Thanks, Frank, for the suggestion. I didn't have them configured, so I
> have done so. Have you any reference to these services in the
> documentation? I have assumed they are datagram services.
> 
> Unfortunately, it has not had the desired effect :-(
> 
> Cheers,
> 
An update to that, FWIW. 

You were correct in your diagnosis of the problem; I hadn't got them
configured correctly. I found the instructions in the Using Amanda book from
Storge Moutain, and this time set it up correctly :-)

Thanks, once again, for your help.

-- 
Tony van der Hoff   | mailto:[EMAIL PROTECTED]
Buckinghamshire England


Re: Connection refused

2004-05-17 Thread Tony van der Hoff
Frank Smith <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> --On Tuesday, May 11, 2004 17:22:28 +0100 Tony van der Hoff
<[EMAIL PROTECTED]> wrote:
> 
> > Hi,
> > 
> > I have successfully installed and configured Amanda, and amcheck runs
> > successfully, as does amdump.
> > 
> > However, amrecover (running as root) fails, with the message "cannot
> > connect to tony-lx.magpieway.net: connection refused"
> > 
> > .amandahosts contains tony-lx.magpieway.net, which is the localhost, as
> > well as the tape server, which user amanda can happily access to do the
> > backups.
> > 
> > Evidently this is a permissions problem with root, but can anyone point
> > me in the right direction to fix it? Runnig Mandrake 9.1.
> 
> Do you have amindexd and amidxtaped configured in (x)inetd on the tape
> server? They aren't needed for backups, but are for restores.
>'connection refused' usually indicates a service isn't running, or
> possibly firewall problems, .amandahosts problems generally give you an
> 'access as foo not allowed..' message.
> 

Thanks, Frank, for the suggestion. I didn't have them configured, so I have
done so. Have you any reference to these services in the documentation? I
have assumed they are datagram services.

Unfortunately, it has not had the desired effect :-(

Cheers,

-- 
Tony van der Hoff   | mailto:[EMAIL PROTECTED]
Buckinghamshire England


Re: Connection refused

2004-05-17 Thread Tony van der Hoff
"Rodrigo Pipoli" <[EMAIL PROTECTED]> wrote in message
<[EMAIL PROTECTED]>

> Hello,
> 
> Specify the user that will be requesting a recover in your .amandahosts
> file. In your example:
> 
>  tony-lx.magpieway.net root
> 
> Separate the host and the user with a blank space. It works for me. :)
> 
> Regards,
> Pipoli
> 
[snip]

Thanks, Pipoli, for the suggestion. I've done that, but it doesn't fix the
problem.

Cheers,
-- 
Tony van der Hoff   | mailto:[EMAIL PROTECTED]
Buckinghamshire England


Connection refused

2004-05-11 Thread Tony van der Hoff
Hi,

I have successfully installed and configured Amanda, and amcheck runs
successfully, as does amdump.

However, amrecover (running as root) fails, with the message 
"cannot connect to tony-lx.magpieway.net: connection refused"

.amandahosts contains tony-lx.magpieway.net, which is the localhost, as well
as the tape server, which user amanda can happily access to do the backups.

Evidently this is a permissions problem with root, but can anyone point me
in the right direction to fix it? Runnig Mandrake 9.1.

Cheers, Tony

-- 
Tony van der Hoff   | mailto:[EMAIL PROTECTED]
Buckinghamshire England