Re: Building amanda on Debian 9 from git

2019-05-12 Thread Charles Curley
On Mon, 13 May 2019 00:31:04 +0200
Uwe Menges  wrote:

> > cp -rp /root/.ssh /home/amandabackup  
> 
> This copies also root's private key(s) and authorized_keys and config,
> which is not desired. You should probably create at least one separate
> key pair for amandabackup (it's up to you if you create a separate key
> for each client and maintain ~amandabackup/.ssh/authorized_keys for
> each client).

You would be correct if root had any of those things. This is a
minimally populated virtual machine, and so far I have not generated
keys for root. So all root has is authorized_keys, which the backup
user may also want.

When I get around to testing on that VM, I may generate keys. In that
event, I will adjust the script.


> 
> > And I'm not sure I need the .ssh in there. Does amanda ever use that
> > user?  
> 
> I believe amanda would use ssh if you configure it with ssh auth.

Right. But so far it has not. It appears that compiling amanda does
not require that user. Running it of course does require a user. But on
debian, that user is backup:backup.

Thanks for the feedback!

-- 
"When we talk of civilization, we are too apt to limit the meaning of
the word to its mere embellishments, such as arts and sciences; but
the true distinction between it and barbarism is, that the one
presents a state of society under the protection of just and
well-administered law, and the other is left to the chance government
of brute force."
- The Rev. James White, Eighteen Christian Centuries, 1889
Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB
https://charlescurley.com


lev 0 FAILED [data timeout]

2019-05-12 Thread Tom Robinson
Hi,

I have a weekly backup that backs-up the daily disk based backup to tape 
(daily's are a separate
amanda config).

Occasionally on the weekly backup a DLE will fail to dump writing only a 32k 
header file before
timing out.

I can't seem to identify the error when looking in logging. Has anyone a few 
clues as to what to
look for?

FAILURE DUMP SUMMARY:
  monza /data/backup/amanda/vtapes/daily/slot9 lev 0  FAILED [data timeout]
  monza /data/backup/amanda/vtapes/daily/slot9 lev 0  FAILED [dumper returned 
FAILED]
  monza /data/backup/amanda/vtapes/daily/slot9 lev 0  FAILED [data timeout]
  monza /data/backup/amanda/vtapes/daily/slot9 lev 0  FAILED [dumper returned 
FAILED]

FAILED DUMP DETAILS:
  /-- monza /data/backup/amanda/vtapes/daily/slot9 lev 0 FAILED [data timeout]
  sendbackup: start [monza:/data/backup/amanda/vtapes/daily/slot9 level 0]
  sendbackup: info BACKUP=/opt/csw/bin/gtar
  sendbackup: info RECOVER_CMD=/opt/csw/bin/gtar -xpGf - ...
  sendbackup: info end
  \
  /-- monza /data/backup/amanda/vtapes/daily/slot9 lev 0 FAILED [data timeout]
  sendbackup: start [monza:/data/backup/amanda/vtapes/daily/slot9 level 0]
  sendbackup: info BACKUP=/opt/csw/bin/gtar
  sendbackup: info RECOVER_CMD=/opt/csw/bin/gtar -xpGf - ...
  sendbackup: info end

DLEs are using:

    root-tar
    strategy noinc
    estimate calcsize
    index no

A while ago I changed estimate to calcsize as the estimates were taking a very 
long time and all
daily slots are a know maximum fixed size. I thought it might help with time 
outs. Alas not.

Kind regards,
Tom




Re: Building amanda on Debian 9 from git

2019-05-12 Thread Chris Hassell


On 5/12/19 12:36 PM, Charles Curley wrote:
> I removed the offending files, and that was fine. Am I incorrect in
> assuming that "make distclean" should remove everything not managed by
> the git repo?

Nope.  It just undoes everything that the automake or its Makefiles
(ideally all) created.  That's it.

The way to clean a repo quickly and specifically for git is "git clean
-d -f"  (directory trees too).

> --
> dh_fixperms -v >> /home/charles/amanda/build/debian/dpkg.log 2>&1
> # fix perms manually
> chown -R amandabackup:disk debian/*/var/lib/*
> chown: invalid user: ‘amandabackup:disk’

I still have no idea why the initial build needs the users that are
actually created *in* the pre-install script.  It's just how it was
done, apparently.


> I can add those to my script. However, I wonder: the traditional
> debian user is backup:backup. Should we not be using that?

Tradition in this case has been missing for over 5 years of time.  Two
years of inactivity.  The disk group is a pretty good one too, and the
3.3.9 distro of Amanda is a different beast than 3.5.1.  I could look
into seeing if we could grandfather the older build process... but
that's as easy as anyone else here can do it.

It just takes looking up the current debian source package and looking
at its scripts and the difference from what we have.

> Also, I noticed some messages about g_thread_* functions being
> deprecated. I have already handled those for another application. If
> you haven't already done so, shall I take a stab at it?
It would be helpful.  Several areas haven't been touched in awhile.  All
C stuff (glib2.0) has languished a bit.
> And with that, it looks like I'm there.
>


> I have a tarball, and four .deb packages. No amanda common package?
There really isn't much to put in amanda-common that I know of (i.e. a
core for multiple choices).  It's either be a full server+client or just
a client.
> With that, my setup script now looks like:
>
> --
> # A script to build out a minimal installation of debian such that we
> # can build amanda on it. Much of this is installing tools.
>
> # We install no editors.
>
> # This should get you through ./autogen.
> apt install git autogen automake libglib2.0-dev
>
> # And this for ./configure && make.
> apt install make dpkg-dev debhelper dump flex gettext gnuplot libtool 
> bsd-mailx mtx smbclient libcurl4-openssl-dev libncurses5-dev libreadline-dev 
> libssl-dev bison swig docbook-xsl xsltproc
>
> # Add the user that the build process expects. Oddly enough, it isn't
> # backup:backup, the user that the debian package builds. I'm going to
> # make this a regular user for now
>
> # To remove, "deluser --remove-home amandabackup".
>
> adduser --disabled-password amandabackup
> adduser amandabackup disk
>
> if [ ! -d /home/amandabackup/.ssh ] ; then
> echo Copying .ssh for user amandabackup
> cp -rp /root/.ssh /home/amandabackup
> chown -R amandabackup:amandabackup /home/amandabackup/.ssh
> fi
>
> --
>
> And I'm not sure I need the .ssh in there. Does amanda ever use that
> user?
I don't think amanda uses ssh as a backup device.  It's probably fine
without.



Re: Building amanda on Debian 9 from git

2019-05-12 Thread Uwe Menges
Hi Charles,

On 5/12/19 8:36 PM, Charles Curley wrote:
> With that, my setup script now looks like:
[...]
> if [ ! -d /home/amandabackup/.ssh ] ; then
> echo Copying .ssh for user amandabackup
> cp -rp /root/.ssh /home/amandabackup

This copies also root's private key(s) and authorized_keys and config,
which is not desired. You should probably create at least one separate
key pair for amandabackup (it's up to you if you create a separate key
for each client and maintain ~amandabackup/.ssh/authorized_keys for each
client).

> And I'm not sure I need the .ssh in there. Does amanda ever use that
> user?

I believe amanda would use ssh if you configure it with ssh auth.

Yours, Uwe


Here is another wierd one for you

2019-05-12 Thread Gene Heskett
Greetings all;

Stretch install from a LCNC respin with a preempt-rt kernel. amd64.

Since I can't get your (amanda-usrs list version) to install, and it 
locks out using synatic until I find another root shell and "dpkg -r 
amanda-server"

But it left me with the /etc/nut subdir being owned by amandabackup:nut, 
disabling nut so I can't talk to my ups. 

The only way that could have been fouled is trying to install 
amandabackup-server.  I can probably fix it, but this is rapidly getting 
to the point of to hell with it.

But I need a backup running, so I just installed the repos version 3.3.9, 
and am in the process of making it work with my helper scripts.

But they've changed the usrname to "backup" so obviously I've at least a 
megabyte of ownerships to change. Change just to be changing things is 
NOT PROGRESS! 

So as root I go to /
and
chown -R backup:disk /amandatapes
then as amanda:
brought to you by Amanda 3.3.9)
amanda@coyote:~/amanda$ /usr/sbin/amcheck Daily
Amanda Tape Server Host Check
-
Holding disk /usr/dumps: 1533084 MB disk space available, using 1532584 
MB
slot ?: Can't make directory '/amandatapes/Dailys/drive0': Permission 
denied
ERROR: Can't make directory '/amandatapes/Dailys/drive0': Permission 
denied
NOTE: conf info dir /usr/local/var/amanda/Daily/curinfo does not exist
NOTE: it will be created on the next run.
NOTE: index dir /usr/local/var/amanda/Daily/index does not exist
NOTE: it will be created on the next run.
Server check took 0.265 seconds

Amanda Backup Client Hosts Check

WARNING: coyote: selfcheck request failed: Connection refused
Client check: 5 hosts checked in 10.011 seconds.  1 problem found.

(brought to you by Amanda 3.3.9)

What is this "drive0" BS?  Its not in any of _my_ configs. But it is in 
Daily/chg-disk and thats a new content file to me. And the 3.3.9 install 
seems to have overwritten mine from 3.3.7p1  And no man page. Screw it, 
I've beat my head on the wall since about 8 this morning. The original 
3.5.1 from zmanda's svn ran just fine for the last 2ish years.



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)
Genes Web page 



Re: Building amanda on Debian 9 from git

2019-05-12 Thread Charles Curley
On Sun, 12 May 2019 03:27:54 +
Chris Hassell  wrote:

> Try the branch "3_5".  That has build fixes that should let it work
> more easily.
> 
> All you need:

I did a "make distclean" first. Then:

> 
>     % git checkout -b 3_5my_branch origin/3_5

That complained:

charles@amanda:~/amanda$ git checkout -b 3_5my_branch origin/3_5
error: Your local changes to the following files would be overwritten by 
checkout:
config/config.guess
config/config.sub
config/install-sh
Please commit your changes or stash them before you switch branches.
Aborting
charles@amanda:~/amanda$

I removed the offending files, and that was fine. Am I incorrect in
assuming that "make distclean" should remove everything not managed by
the git repo?

> 
>     % bash autogen && ./packaging/deb/buildpkg

That revealed two unmet dependencies, docbook-xsl and xsltproc. I added
those to my script.

I now get

--
dh_fixperms -v >> /home/charles/amanda/build/debian/dpkg.log 2>&1
# fix perms manually
chown -R amandabackup:disk debian/*/var/lib/*
chown: invalid user: ‘amandabackup:disk’
debian/rules:122: recipe for target 'binary-arch' failed
make: *** [binary-arch] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
charles@amanda:~/amanda$
--

I can add those to my script. However, I wonder: the traditional
debian user is backup:backup. Should we not be using that?

Also, I noticed some messages about g_thread_* functions being
deprecated. I have already handled those for another application. If
you haven't already done so, shall I take a stab at it?

And with that, it looks like I'm there.

--
...
 dpkg-genbuildinfo
 dpkg-genchanges  >../amanda_3.5.1.git.19364c7b-1Debian99_amd64.changes
dpkg-genchanges: info: including full source code in upload
 dpkg-source --after-build build
dpkg-buildpackage: info: full upload; Debian-native package (full source is 
included)
charles@amanda:~/amanda$ 
--

I have a tarball, and four .deb packages. No amanda common package?

With that, my setup script now looks like:

--
# A script to build out a minimal installation of debian such that we
# can build amanda on it. Much of this is installing tools.

# We install no editors.

# This should get you through ./autogen.
apt install git autogen automake libglib2.0-dev

# And this for ./configure && make.
apt install make dpkg-dev debhelper dump flex gettext gnuplot libtool bsd-mailx 
mtx smbclient libcurl4-openssl-dev libncurses5-dev libreadline-dev libssl-dev 
bison swig docbook-xsl xsltproc

# Add the user that the build process expects. Oddly enough, it isn't
# backup:backup, the user that the debian package builds. I'm going to
# make this a regular user for now

# To remove, "deluser --remove-home amandabackup".

adduser --disabled-password amandabackup
adduser amandabackup disk

if [ ! -d /home/amandabackup/.ssh ] ; then
echo Copying .ssh for user amandabackup
cp -rp /root/.ssh /home/amandabackup
chown -R amandabackup:amandabackup /home/amandabackup/.ssh
fi

--

And I'm not sure I need the .ssh in there. Does amanda ever use that
user?

-- 
"When we talk of civilization, we are too apt to limit the meaning of
the word to its mere embellishments, such as arts and sciences; but
the true distinction between it and barbarism is, that the one
presents a state of society under the protection of just and
well-administered law, and the other is left to the chance government
of brute force."
- The Rev. James White, Eighteen Christian Centuries, 1889
Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB
https://charlescurley.com