Re: amrecover as root on client NAK'd

2019-06-24 Thread Nathan Stratton Treadway
On Mon, Jun 24, 2019 at 15:03:35 -0400, Gene Heskett wrote:
> But right now I need to reach back about 10 days and recover 
> my /home/pi/linuxcnc directory which contains the configs and nc_files 
> to run this 1500 lb lathe.
> 
> But it won't let me run it on the client.  On this host, it won't let me 
> setdisk to /home/pi
> Session:
> gene@coyote:~$ sudo amrecover Daily
> [sudo] password for gene:
> AMRECOVER Version 3.5.1.git.19364c7b. Contacting server on coyote ...
> 220 coyote AMANDA index server (3.5.1.git.19364c7b) ready.
> Setting restore date to today (2019-06-24)
> 200 Working date set to 2019-06-24.
> 200 Config set to Daily.
> 200 Dump host set to coyote.
> Use the setdisk command to choose dump disk to recover
> amrecover> sethost picnc
> 200 Dump host set to picnc.
> amrecover> setdisk /
> 200 Disk set to /.
> amrecover> setdate --06-08
> 200 Working date set to 2019-06-08.
> amrecover> cd /home/pi
> /home/pi
> amrecover> lcd /home/pi
> /home/pi: No such file or directory
> amrecover> 
> 
>
> so that both lpwd and pwd show the same paths.
> which should be /home/pi
> but I cannot 
> amrecover> lcd pi
> pi: No such file or directory
> 
> What I want is to extract the /home/pi/linuxcnc directory insitu
> I've setdate to the date of the last full of this particular file.
> That was on --06-08, and there were about 4 incrementals since.
> 
> How do I do this?  Thank you. 

Looks like you have already retrieved the files you needed, but to
(attempt to) answer your original question: 

>From the above transcript you appear to be running amrecover on coyote,
but trying to change the local directory to "/home/pi" but I assume
that directory only exists on picnc, right?

(Note that you actually do seem to have successfully set the amrecover
"extraction source directory" to /home/pi on the "picnc /" disk; the
error came when you tried to use the "lcd" command to set the extraction
destination directory.)

If you were running amrecover on picnc it might make sense to recover
directly in-place, but presumably since you are extracting on coyote you
would want to create a temporary working directory to hold the recovered
directory tree, run the amrecover session from within that temporary
directory, then copy/move the files you need from that directory tree
over to the appropriate locations on picnc


Nathan



Nathan Stratton Treadway - natha...@ontko.com - Mid-Atlantic region Ray
Ontko & Co.  - Software consulting services - http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239


Re: amrecover as root on client NAK'd

2019-06-24 Thread Jon LaBadie
On Mon, Jun 24, 2019 at 03:03:35PM -0400, Gene Heskett wrote:
> Greetings all;
> 
> I have a pi running stretch with an rt-preempt kernel so it can run 
> linuxcnc, which according to my tests so far it should do it nicely, its 
> realtime enough to handle servo machines with a 1 kilohertz update rate, 
> jitter is about 29 microseconds.
> 
> But I've followed the output of amcheck and it now reports no errors, 
> although the excludes file is empty, something I'll need to fix.

I thought that was the norm.  The file is there so amcheck is happy.
It doesn't check the contents.  That is so you can define an exclude
file for all DLEs and if unneeded, leave empty.

-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: amrecover/amrestore: block size too small

2019-06-24 Thread Jon LaBadie
I sent the following note to Steve.  I don't have facilities
to check if my comments are correct.  Anyone care to comment
or check?

On Wed, Jun 19, 2019 at 07:37:23PM +0200, Stefan G. Weichinger wrote:
...
> 
> $ amrestore  --config abt -b 2097152 /dev/nst0 jupi smb_revision
> 
> seems to work now ... at least it starts searching.
> 
> I don't know why I have to tell that ... but it seems I have a mismatch:
> 
> tapetype says 32 kbytes:
> 
> define tapetype LTO-4 {
> comment "Created by amtapetype; compression disabled; 2017-10-31
> sgw"
> length 698510208 kbytes
> filemark 0 kbytes
> speed 36696 kps
> blocksize 32 kbytes
> }
> 
> changer def sets "2 mbytes":
> 
> define changer robot {
> tpchanger "chg-robot:/dev/sg1"
> property "tape-device" "0=tape:/dev/nst0"
> device-property "BLOCK_SIZE" "2 mbytes"
> device-property "READ_BLOCK_SIZE" "2 mbytes"
> property "eject-before-unload" "no"
> property "use-slots" "1-24"
> changerfile "/etc/amanda/abt/chg-robot-dev-sg1"
> }
> 
> storage def pulls in both:
> 
> define storage abt {
> tapepool "abt"
> tapetype "LTO-4"
> tpchanger "robot"
> [..]
> }
> 
> Maybe then amrecover would also work (bailed out before as well)
>>> End of included message <<<

I don't think LTO-4 will use a 32K blocksize.  Minimum is probably
over 1M.  32K in tapetype is just what you said via command line
or letting it default.  Amrestore is probably just reading this
and knowing, or testing, that LT0-4 won't take 32K BS.

Pull off of a tape the first file.  It will be named "0.".
I think it will be 1 tape block in size.  But contain < 32K of data.

Pull off the first data file of a DLE and look at the first 32K.
One of mine ends with this:

To restore, position tape at start of file and run:
dd if= bs=32k skip=1 | /usr/bin/gzip -d | /usr/libexec/
amanda/application/amgtar restore [./file-to-restore]+

The "bs=32K" in my command line may be the BS actually used.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: amrecover as root on client NAK'd

2019-06-24 Thread Gene Heskett
On Monday 24 June 2019 16:16:55 Debra S Baddorf wrote:

> > On Jun 24, 2019, at 2:03 PM, Gene Heskett 
> > wrote:
> >
> > Greetings all;
> >
> > I have a pi running stretch with an rt-preempt kernel so it can run
> > linuxcnc, which according to my tests so far it should do it nicely,
> > its realtime enough to handle servo machines with a 1 kilohertz
> > update rate, jitter is about 29 microseconds.
> >
> > But I've followed the output of amcheck and it now reports no
> > errors, although the excludes file is empty, something I'll need to
> > fix.
> >
> > But right now I need to reach back about 10 days and recover
> > my /home/pi/linuxcnc directory which contains the configs and
> > nc_files to run this 1500 lb lathe.
> >
> > But it won't let me run it on the client.  On this host, it won't
> > let me setdisk to /home/pi
> > Session:
> > gene@coyote:~$ sudo amrecover Daily
> > [sudo] password for gene:
> > AMRECOVER Version 3.5.1.git.19364c7b. Contacting server on coyote
> > ... 220 coyote AMANDA index server (3.5.1.git.19364c7b) ready.
> > Setting restore date to today (2019-06-24)
> > 200 Working date set to 2019-06-24.
> > 200 Config set to Daily.
> > 200 Dump host set to coyote.
> > Use the setdisk command to choose dump disk to recover
> > amrecover> sethost picnc
> > 200 Dump host set to picnc.
> > amrecover> setdisk /
> > 200 Disk set to /.
> > amrecover> setdate --06-08
> > 200 Working date set to 2019-06-08.
> > amrecover> cd /home/pi
> > /home/pi
> > amrecover> lcd /home/pi
> > /home/pi: No such file or directory
> > amrecover>
> >
> >
> > so that both lpwd and pwd show the same paths.
> > which should be /home/pi
> > but I cannot
> > amrecover> lcd pi
> > pi: No such file or directory
> >
> > What I want is to extract the /home/pi/linuxcnc directory insitu
> > I've setdate to the date of the last full of this particular file.
> > That was on --06-08, and there were about 4 incrementals since.
> >
> > How do I do this?  Thank you.
> >
> > Cheers, Gene Heskett
>
> I *think*   I’ve had to   “cd  /home”  then  “cd pi”  …. i.e.  do one
> directory at a time. Actually, since you are already in   “setdisk / “
>then the first command is  “cd home”   with no slash.
>
> Worth a try, anyway…
>
> Deb Baddorf
> Fermilab
dead in the water Deb.

At this point, I think I'll use some of /amandatapes spare space to 
extract the last full, then go find what I need, and copy it back by 
hand. AIR use dd to feed starting at 32k, to tar xv
better yet use dd to get the instructions from the files header 

which I did, but the final tar's argument was wrong and it errored 
without creating an output file.  So I just fed it to tar x -, and it 
worked perfectly. Then I used a root mc to copy the 2 trees I needed to 
a transfer dir in my /home/gene/linuxcnc dir, did a chown -R gene:gene 
on both of those dirs.  Then found /sshnet/picnc was empty, so dropped 
out of root, cd, then ran bin/mount-machines answering with my pw, which 
brought that link to life, fired up mc as me, and copied those 2 dirs 
to /sshnet/picnc/home/pi/linucnc.shut that down and ran linuxcnc picking 
the normal config, and 20 seconds later I had the same gui I've been 
looking at for a couple years.  So I think I am in business. Just one 
problem, the grin has pushed my ears a good half an inch to the 
rear. :-)

Thanks for the hand holding, Deb, its both appreciated, and helps keep my 
train of thought from getting derailed in the minutia. At 84 & still 
counting, that is very easy to do.  Theres's no one else here that both 
understands what I'm doing, or cares if I do it. Nobody else to talk to 
IOW.

Its past dinnertime here, so I'd better go do something about that. 

Take care now.

Copyright 2019 by Maurice E. Heskett
Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 



Re: amrecover/amrestore: block size too small

2019-06-24 Thread Stefan G. Weichinger
Am 24.06.19 um 22:06 schrieb Debra S Baddorf:

> You can also use  “dd”  to get the whole dump off tape.  You would have to 
> “glue” together
> any partial files;  I don’t know how to do that  (I’ve specified no partial 
> files).
> 
> “dd” still needs a reasonably correct block size.

thanks for the workaround howto

but I would prefer to have a fully working amanda setup ;-)

I fiddle with the parameters and managed to get amrecover working. Seems
one has to relabel and/or edit the tapelist as well.

I read the numerous how-to-relabel-postings ... couldn't we get a *tool*
doing that? I mean, other software projects improve over time ;-)

Another thought: if the blocksize of the tapetype and the blocksize of
the changer-definition mismatch: shouldn't there be a warning? Something
in amcheck or so ...

Right now we get errors in dmesg etc ... not very user-friendly IMO.

greets, Stefan


Re: amrecover as root on client NAK'd

2019-06-24 Thread Debra S Baddorf



> On Jun 24, 2019, at 2:03 PM, Gene Heskett  wrote:
> 
> Greetings all;
> 
> I have a pi running stretch with an rt-preempt kernel so it can run 
> linuxcnc, which according to my tests so far it should do it nicely, its 
> realtime enough to handle servo machines with a 1 kilohertz update rate, 
> jitter is about 29 microseconds.
> 
> But I've followed the output of amcheck and it now reports no errors, 
> although the excludes file is empty, something I'll need to fix.
> 
> But right now I need to reach back about 10 days and recover 
> my /home/pi/linuxcnc directory which contains the configs and nc_files 
> to run this 1500 lb lathe.
> 
> But it won't let me run it on the client.  On this host, it won't let me 
> setdisk to /home/pi
> Session:
> gene@coyote:~$ sudo amrecover Daily
> [sudo] password for gene:
> AMRECOVER Version 3.5.1.git.19364c7b. Contacting server on coyote ...
> 220 coyote AMANDA index server (3.5.1.git.19364c7b) ready.
> Setting restore date to today (2019-06-24)
> 200 Working date set to 2019-06-24.
> 200 Config set to Daily.
> 200 Dump host set to coyote.
> Use the setdisk command to choose dump disk to recover
> amrecover> sethost picnc
> 200 Dump host set to picnc.
> amrecover> setdisk /
> 200 Disk set to /.
> amrecover> setdate --06-08
> 200 Working date set to 2019-06-08.
> amrecover> cd /home/pi
> /home/pi
> amrecover> lcd /home/pi
> /home/pi: No such file or directory
> amrecover> 
> 
> 
> so that both lpwd and pwd show the same paths.
> which should be /home/pi
> but I cannot 
> amrecover> lcd pi
> pi: No such file or directory
> 
> What I want is to extract the /home/pi/linuxcnc directory insitu
> I've setdate to the date of the last full of this particular file.
> That was on --06-08, and there were about 4 incrementals since.
> 
> How do I do this?  Thank you. 
> 
> Cheers, Gene Heskett

I *think*   I’ve had to   “cd  /home”  then  “cd pi”  …. i.e.  do one directory 
at a time.
Actually, since you are already in   “setdisk / “then the first command is  
“cd home”   with no slash.

Worth a try, anyway…

Deb Baddorf
Fermilab




Re: amrecover/amrestore: block size too small

2019-06-24 Thread Debra S Baddorf



> On Jun 24, 2019, at 7:14 AM, Stefan G. Weichinger  wrote:
> 
> 
> I stil have issues here:
> 
>  amrestore  --config abt -b 2097152 /dev/nst0 jupi smb_revision
> Restoring from tape ABT-401 starting with file 1.
> amrestore: 1: skipping split dumpfile: date 20190607213002 host juno
> disk vm182 part 1/UNKNOWN lev 0 comp N program /bin/tar
> 
> 
> [..]
> 
> 
> amrestore: 12: restoring split dumpfile: date 20190607213002 host jupi
> disk smb_revision part 1/UNKNOWN lev 1 comp .gz program /bin/tar crypt
> enc client_encrypt /usr/sbin/amcrypt client_decrypt_option -d
> filter stderr:
> filter stderr: aespipe: write failed
> filter stderr: gzip: stdin: decompression OK, trailing garbage ignored
> 
> 
> What?
> 
> I will try it with "-r"/raw now and try to decrypt later.


You can also use  “dd”  to get the whole dump off tape.  You would have to 
“glue” together
any partial files;  I don’t know how to do that  (I’ve specified no partial 
files).

“dd” still needs a reasonably correct block size.

Deb Baddorf




amrecover as root on client NAK'd

2019-06-24 Thread Gene Heskett
Greetings all;

I have a pi running stretch with an rt-preempt kernel so it can run 
linuxcnc, which according to my tests so far it should do it nicely, its 
realtime enough to handle servo machines with a 1 kilohertz update rate, 
jitter is about 29 microseconds.

But I've followed the output of amcheck and it now reports no errors, 
although the excludes file is empty, something I'll need to fix.

But right now I need to reach back about 10 days and recover 
my /home/pi/linuxcnc directory which contains the configs and nc_files 
to run this 1500 lb lathe.

But it won't let me run it on the client.  On this host, it won't let me 
setdisk to /home/pi
Session:
gene@coyote:~$ sudo amrecover Daily
[sudo] password for gene:
AMRECOVER Version 3.5.1.git.19364c7b. Contacting server on coyote ...
220 coyote AMANDA index server (3.5.1.git.19364c7b) ready.
Setting restore date to today (2019-06-24)
200 Working date set to 2019-06-24.
200 Config set to Daily.
200 Dump host set to coyote.
Use the setdisk command to choose dump disk to recover
amrecover> sethost picnc
200 Dump host set to picnc.
amrecover> setdisk /
200 Disk set to /.
amrecover> setdate --06-08
200 Working date set to 2019-06-08.
amrecover> cd /home/pi
/home/pi
amrecover> lcd /home/pi
/home/pi: No such file or directory
amrecover> 

   
so that both lpwd and pwd show the same paths.
which should be /home/pi
but I cannot 
amrecover> lcd pi
pi: No such file or directory

What I want is to extract the /home/pi/linuxcnc directory insitu
I've setdate to the date of the last full of this particular file.
That was on --06-08, and there were about 4 incrementals since.

How do I do this?  Thank you. 
 
Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


Re: amrecover/amrestore: block size too small

2019-06-24 Thread Stefan G. Weichinger


I stil have issues here:

  amrestore  --config abt -b 2097152 /dev/nst0 jupi smb_revision
Restoring from tape ABT-401 starting with file 1.
amrestore: 1: skipping split dumpfile: date 20190607213002 host juno
disk vm182 part 1/UNKNOWN lev 0 comp N program /bin/tar


[..]


amrestore: 12: restoring split dumpfile: date 20190607213002 host jupi
disk smb_revision part 1/UNKNOWN lev 1 comp .gz program /bin/tar crypt
enc client_encrypt /usr/sbin/amcrypt client_decrypt_option -d
filter stderr:
filter stderr: aespipe: write failed
filter stderr: gzip: stdin: decompression OK, trailing garbage ignored


What?

I will try it with "-r"/raw now and try to decrypt later.