GNU tar syntax (or How does amanda do that?)

2001-05-11 Thread Paul Brannigan

Some times I would like to just use GNU tar at
the command line for a quick archive to
a tape device on a remote host.
My Amanda system seems to do this very well.
Amanda some how uses GNU tar to archive
files on a Solaris 2.6 host to a remote tape device that is
attached to a Linux (7.0) host.

Yet when I try to do this at the command line I get
tar complaints.  Am I using the wrong syntax?

solaris-host#/usr/local/bin/tar -cvf linux-host:/dev/nst0 /home
sh: unknown host
/usr/local/bin/tar: Cannot open linux-host:/dev/nst0: I/O error
/usr/local/bin/tar: Error is not recoverable: exiting now

Why the odd error: sh: unknown host
In every respect these two host know about each other.
with wide open permissions for logins, .rhosts etc.

I had read some posts about a buggy version of GNU tar.
The GNU mirror sites don't seem to specify any revisions,
just 1.13   not the rumored 1.13.19  or the 1.13.17 which is
running on my linux host.

But like I said, as long as I let Amanda do the tar all is well.
I just wanted to be able to do a quick tar on the Solaris host without
changing any of my amanda configurations.
What say you good people?

Paul



begin:vcard 
n:Brannigan;Paul
tel;pager:303-826-2365
tel;fax:303-245-1025
tel;work:303-245-1045
x-mozilla-html:TRUE
adr:;;3434 47th St.;Boulder;Colorado;80301;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Support Engineer
x-mozilla-cpt:;-5024
fn:Paul Brannigan
end:vcard



Re: amrecover : setdisk syntax

2001-03-29 Thread Paul Brannigan

"John R. Jackson" wrote:

 Can't determine disk and mount point from $CWD

 Amanda takes your current working directory ($CWD) and tries to figure
 out what disk it is related to in disklist on the assumption you started
 amrecover from the client and disk you want to do the restore into.
 The message says it was not able to do that, which could be caused by
 any number of things.


I tried to set CWD as an environment variable in a variety of shells (bash,
csh, ksh)
export CWD=`pwd`
 but alas I still got the complaint, "Can't determine disk and mount
point from $CWD"


 What disklist entry do you think should match your current working
 directory?

I am testing with the root directory of my workstation "clark, a Red Hat 7.0
PC"  clark is my amanda server,
index server and tape server.  Using amdump with (index = yes) I dumped
/dev/hda1, the root partition.
From the "/" directory I executed amrecover.  At the amrecover prompt I
tried to set my disk with
the following results:
# amrecover -C Weekly -s clark -t clark -d /dev/nst0
AMRECOVER Version 2.4.2p1. Contacting server on clark. ...
220 clark AMANDA index server (2.4.1p1) ready.
200 Access OK
Setting restore date to today (2001-03-29)
200 Working date set to 2001-03-29.
200 Config set to Weekly.
200 Dump host set to clark.
Can't determine disk and mount point from $CWD
amrecover setdisk /dev/hda1
598 Error: disk not found.
amrecover




 Do you have index set to "yes" for the dumptype associated with that
 disk?

Yes,  here are some excerpts from my amanda.conf and disklist

from amanda.conf:
...
infofile "/usr/local/etc/amanda/Weekly/curinfo" # database DIRECTORY
logdir   "/usr/local/etc/amanda/Weekly" # log directory
indexdir "/usr/local/etc/amanda/Weekly" # index directory
tapelist "/usr/local/etc/amanda/Weekly/tapelist"# list of used tapes



define dumptype linux0 {
comment "Linux dump level 0"
program "DUMP"
dumpcycle 0
index yes
}

from disklist:
#
# clark
#
clark /dev/hda1 linux0
clark /dev/hda5 linux0
clark /dev/hda3 linux0
clark /dev/hda6 linux0



 amrecover setdisk /dev/hda1
 598 Error: disk not found.

 That's the correct syntax, but again, it is not finding the index records
 that match "/dev/hda1".  Same questions as above: is that a disklist
 entry, and do you have indexing turned on?

 One way to see what Amanda is working with is to look at your indexdir
 entry in amanda.conf.  That points to a directory.  In there is one
 directory per client, and in each client directory is one more directory
 for each disk (that has indexing turned on).  Finally, in those
 directories, are the gzip'd index files themselves.

In my /usr/local/etc/amanda/Weekly directory there is a "clark" directory
with breaks out in an index tree holding the gzip'd files

[/usr/local/etc/amanda/Weekly]cd clark
[/usr/local/etc/amanda/Weekly/clark]ls
_dev_hda1/  _dev_hda3/  _dev_hda5/  _dev_hda6/
[/usr/local/etc/amanda/Weekly/clark]cd _dev_hda1
[/usr/local/etc/amanda/Weekly/clark/_dev_hda1]ls
20010326_0.gz  20010326_1.gz  20010328_0.gz  20010328_1.gz
[/usr/local/etc/amanda/Weekly/clark/_dev_hda1]




 Note that Amanda is picky about things matching.  For instance, if
 your disklist entry is "hda1", you cannot enter "/dev/hda1" (or the
 mount point).  Some of that can be worked around with symlinks, but
 amrecover usually gets it right when properly set up.

 Another place to look for clues is /tmp/amanda/amindexd*debug on your
 server (clark).

Here is my amindexd.debug file

amindexd: debug 1 pid 4270 ruid 11 euid 11 start time Thu Mar 29 10:36:15
2001
amindexd: version 2.4.1p1
 220 clark AMANDA index server (2.4.1p1) ready.
 SECURITY USER root
bsd security: remote host clark.purematrix.com user root local user operator

amandahosts security check passed
 200 Access OK
 DATE 2001-03-29
 200 Working date set to 2001-03-29.
 SCNF Weekly
 200 Config set to Weekly.
 HOST clark
 200 Dump host set to clark.
 DISK /
 501 No index records for disk: /. Invalid?
 DISK root
 501 No index records for disk: root. Invalid?
 DISK /dev/hda1
! /usr/sbin/amadmin Weekly find clark \^/dev/hda1\$
 598 Error: disk not found.
 QUIT
 200 Good bye.
amindexd: pid 4270 finish time Thu Mar 29 10:36:33 2001




 John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]


begin:vcard 
n:Brannigan;Paul
tel;fax:303-245-1025
tel;work:303-245-1045
x-mozilla-html:TRUE
adr:;;3434 47th St.;Boulder;Colorado;80301;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Support Engineer
x-mozilla-cpt:;0
fn:Paul Brannigan
end:vcard



amrecover errors: configuration keyword expected

2001-03-28 Thread Paul Brannigan

Running amrecover complains about several things.

anybody know why?

As root I execute the following:

# amrecover -C Weekly -s clark -t clark -d /dev/nst0

AMRECOVER Version 2.4.2p1. Contacting server on clark ...
220 clark AMANDA index server (2.4.1p1) ready.
200 Access OK
Setting restore date to today (2001-03-28)
200 Working date set to 2001-03-28.
"amanda.conf", line 41: configuration keyword expected
"amanda.conf", line 41: end of line expected
"amanda.conf", line 44: configuration keyword expected
"amanda.conf", line 44: end of line expected
"amanda.conf", line 48: configuration keyword expected
"amanda.conf", line 48: end of line expected
501 Couldn't read config file /etc/amanda/Weekly/amanda.conf!
501 Must set config before setting host.
Trying clark.xxxcom ...
501 Must set config before setting host.
Trying clark ...
501 Must set config before setting host.
amrecover quit
200 Good bye.

the first complaints are due to the following 3 lines
in my amanda.conf.

line 41: dtimeout 1800

line 44: ctimeout 30

line 48: tapebufs 20


If I comment out those three lines I then get the following complaint.

AMRECOVER Version 2.4.2p1. Contacting server on clark ...
220 clark AMANDA index server (2.4.1p1) ready.
200 Access OK
Setting restore date to today (2001-03-28)
200 Working date set to 2001-03-28.
200 Config set to Weekly.
200 Dump host set to clark.
Can't determine disk and mount point from $CWD

Any Ideas?







begin:vcard 
n:Brannigan;Paul
tel;fax:303-245-1025
tel;work:303-245-1045
x-mozilla-html:TRUE
adr:;;3434 47th St.;Boulder;Colorado;80301;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Support Engineer
x-mozilla-cpt:;0
fn:Paul Brannigan
end:vcard



Re: amrecover errors: configuration keyword expected

2001-03-28 Thread Paul Brannigan

Alexandre Oliva wrote:

 On Mar 28, 2001, Paul Brannigan [EMAIL PROTECTED] wrote:

  220 clark AMANDA index server (2.4.1p1) ready.
  "amanda.conf", line 41: configuration keyword expected
  "amanda.conf", line 41: end of line expected
  "amanda.conf", line 44: configuration keyword expected
  "amanda.conf", line 44: end of line expected
  "amanda.conf", line 48: configuration keyword expected
  "amanda.conf", line 48: end of line expected

  line 41: dtimeout 1800

  line 44: ctimeout 30

  line 48: tapebufs 20

 These options aren't supported in 2.4.1p1 (which the index server is
 running).


I understand, thanks. I have removed thos lines.
However I am now confused by the complaint,

"Can't determine disk and mount point from $CWD"





begin:vcard 
n:Brannigan;Paul
tel;fax:303-245-1025
tel;work:303-245-1045
x-mozilla-html:TRUE
adr:;;3434 47th St.;Boulder;Colorado;80301;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Support Engineer
x-mozilla-cpt:;0
fn:Paul Brannigan
end:vcard



amrecover: Unexpected server end of file

2001-03-27 Thread Paul Brannigan

Yes I know this is a popular error message.

# amrecover -C Weekly -s clark -t clark -d /dev/nst0
AMRECOVER Version 2.4.2p1. Contacting server on clark ...
amrecover: Unexpected server end of file

In this case the command was executed on the host "clark"
clark happens to be the amanda server, tape server and index server.
clark is also a client.  However I get the same error when this command
is executed from the other clients.

I have been reading hundreds of posts on this, as well as the
suspected DNS problem outlined in the FAQ.

Often the response to these posts is,
"What does your /tmp/amanda/amindexd*debug file say?"

This is my fundamental problem. I don't have a amindexd*debug file.
I have all the other debug files:

amandad.debug  amrecover.debug  killpgrp.debugsendsize.debug
amcheck.debug  amtrmidx.debug   selfcheck.debug
amlabel.debug  amtrmlog.debug   sendbackup.debug

Can anyone help me to start logging to a amindexd*debug file?
Then I can start to trouble shoot the real problem
"amrecover: Unexpected server end of file"

phbrannigan



Here is my environment info:
OS = RedHat 7.0
Amanda = amanda-2.4.2p1

built with:
./configure --with-user=amanda --with-group=disk

# netstat -a | grep am
tcp0  0 *:amidxtape *:*
LISTEN
tcp0  0 *:amandaidx *:*
LISTEN
udp0  0 *:amanda*:*

xinetd.d info:

service amanda
{
socket_type = dgram
protocol = udp
wait = yes
user = amanda
group = disk
server = /usr/local/libexec/amandad
disable = no
}

service amandaidx
{
socket_type = stream
protocol= tcp
wait= yes
user= operator
group   = disk
server  = /usr/lib/amanda/amindexd
disable = no
}

service amidxtape
{
socket_type = stream
protocol= tcp
wait= no
user= operator
group   = disk
server  = /usr/lib/amanda/amidxtaped
disable = no
}

disklist file:
...
#
# clark
#
clark /dev/hda1 linux0


amanda.conf file
...
define dumptype linux0 {
comment "Linux dump level 0"
program "DUMP"
dumpcycle 0
index yes
}
...







begin:vcard 
n:Brannigan;Paul
tel;fax:303-245-1025
tel;work:303-245-1045
x-mozilla-html:TRUE
adr:;;3434 47th St.;Boulder;Colorado;80301;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Support Engineer
x-mozilla-cpt:;0
fn:Paul Brannigan
end:vcard



Re: amrecover: Unexpected server end of file

2001-03-27 Thread Paul Brannigan


 Here is what I get after I run # su operator -c /usr/lib/amanda/amindexd

 amindexd: open debug file "/tmp/amanda/amindexd.debug": Permission denied



Ok Now I opened up permissions on /tmp/amanda.
I re ran the command with the following results

# su operator -c /usr/lib/amanda/amindexd
amindexd: getpeername: Socket operation on non-socket

Indeed.  There is now a amindexd.debug file

We are getting there...

Now after I run amrecover I get this:

[root@clark /root]# amrecover -C Weekly -s clark -t clark -d /dev/nst0
AMRECOVER Version 2.4.2p1. Contacting server on clark ...
220 clark AMANDA index server (2.4.1p1) ready.
500 Access not allowed: [access as operator not allowed from
[EMAIL PROTECTED]]

Here is my new amindexd.debug file:

 220 clark AMANDA index server (2.4.1p1) ready.
 SECURITY USER root
bsd security: remote host clark.xxx.com user root local user operator
check failed: [access as operator not allowed from [EMAIL PROTECTED]]
 500 Access not allowed: [access as operator not allowed from
[EMAIL PROTECTED]]
 200 Good bye.
amindexd: pid 2973 finish time Tue Mar 27 13:41:45 2001

It is looking like I should adjust my
/etc/xinetd.d/amandaidx and / or  amidxtape file(s)




begin:vcard 
n:Brannigan;Paul
tel;fax:303-245-1025
tel;work:303-245-1045
x-mozilla-html:TRUE
adr:;;3434 47th St.;Boulder;Colorado;80301;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Support Engineer
x-mozilla-cpt:;0
fn:Paul Brannigan
end:vcard



Re: amrecover: Unexpected server end of file

2001-03-27 Thread Paul Brannigan

"John R. Jackson" wrote:


 The amindexd is dieing right away, before it can even open the debug
 file.  What happens if you do this:

   # su operator -c /usr/lib/amanda/amindexd

 It should die right away with a message something like this:

   amindexd: getpeername: Socket operation on non-socket

 but it should also create the amindexd*debug file.


First of all, Thank you John for responding.  I am enjoying your work
and Alexandre's as I read and re-read the O'Reilly book.
I hope you get a big piece of my $39.95   ;-)

Here is what I get after I run # su operator -c /usr/lib/amanda/amindexd

amindexd: open debug file "/tmp/amanda/amindexd.debug": Permission denied

phbrannigan


begin:vcard 
n:Brannigan;Paul
tel;fax:303-245-1025
tel;work:303-245-1045
x-mozilla-html:TRUE
adr:;;3434 47th St.;Boulder;Colorado;80301;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Support Engineer
x-mozilla-cpt:;0
fn:Paul Brannigan
end:vcard