Re: Amanda scripts collection(s)?

2020-12-21 Thread Stefan G. Weichinger

Am 20.12.20 um 19:23 schrieb Stefan G. Weichinger:


Am 20.12.20 um 16:55 schrieb Charles Curley:

On Sun, 20 Dec 2020 10:47:40 +0100
"Stefan G. Weichinger"  wrote:


It's kind of an invitation to share and contribute, yes, and with
your permission I would like to add your script(s) as well.


Yes, of course. Thanks for taking this on.


Great, I will set this on my todo list for the more quiet days ahead.

I will add your vtape-script and Gene's other scripts to the repo, and 
try to create initial READMEs for each tool.


As soon as it's in the repo on github, people can more easily contribute 
by filing issues and pull requests there.


See very rough additions at 
https://github.com/stefangweichinger/amanda-helpers


For sure, we have to come up with more structure in the future, for 
example tags for filtering/searching etc


And the READMEs will have to be improved and formatted nicer.

It's a start.


Re: Amanda scripts collection(s)?

2020-12-20 Thread Stefan G. Weichinger

Am 20.12.20 um 17:15 schrieb Winston Sorfleet:

This is a great idea.  I used Charles' 2010-vintage createvtapes.sh
myself originally.  With a number of options arguments changing in later
versions of Amanda, many of my old script recipes have since become
obsolete.

While we can look at well-documented shell scripts to see what they do
and how to invoke, I wonder if it might be useful to write up a
man-style page to accompany the most universal of them.


Good suggestion. Maybe at first collect and sort, then see what tools 
might need a man-page?


It might also make sense to collect some of the how-to-knowledge the 
list contains over the years. The wiki etc is rather outdated and as 
long as there is no defined maintainer of the official doc-content it 
makes sense to collect stuff in a separate place.


The list-archives are there, yes, but personally I find them hard to 
search through.


Re: Amanda scripts collection(s)?

2020-12-20 Thread Stefan G. Weichinger



Am 20.12.20 um 16:55 schrieb Charles Curley:

On Sun, 20 Dec 2020 10:47:40 +0100
"Stefan G. Weichinger"  wrote:


It's kind of an invitation to share and contribute, yes, and with
your permission I would like to add your script(s) as well.


Yes, of course. Thanks for taking this on.


Great, I will set this on my todo list for the more quiet days ahead.

I will add your vtape-script and Gene's other scripts to the repo, and 
try to create initial READMEs for each tool.


As soon as it's in the repo on github, people can more easily contribute 
by filing issues and pull requests there.



We can discuss if all the scripts should be copied there or if a mix
of scripts and a link collection also does the trick.


I think both, with the reminder that links do rot as web sites die off.


correct.


Re: Amanda scripts collection(s)?

2020-12-20 Thread Winston Sorfleet
This is a great idea.  I used Charles' 2010-vintage createvtapes.sh
myself originally.  With a number of options arguments changing in later
versions of Amanda, many of my old script recipes have since become
obsolete.

While we can look at well-documented shell scripts to see what they do
and how to invoke, I wonder if it might be useful to write up a
man-style page to accompany the most universal of them.

On 2020-12-20 10:14 a.m., Gene Heskett wrote:
> On Sunday 20 December 2020 04:47:40 Stefan G. Weichinger wrote:
>
>> Am 18.12.20 um 20:03 schrieb Charles Curley:
>>> Has anyone collected Amanda helper scripts? I see "Stefan G.
>>> Weichinger"  just posted Gene Heskett
>>> 's helper script on github.
>>> https://github.com/stefangweichinger/amanda-helpers/blob/master/gene
>>> s_helper.sh
>>>
>>> I have my vtape builder script on my blog, and may yet post more.
>>> http://charlescurley.com/blog/tag/amanda.html
>>>
>>> Is anyone collecting these? I did not see anything obvious in a
>>> quick peruse of the wiki.
>>> https://wiki.zmanda.com/index.php/Main_Page
>> Well, the wiki is maintained by Betsol, I assume ...
> I'm not sure I'd bet on it, Stefan. This bunch of amateurs may not know 
> what a wiki even is.
>
>> My tiny amanda-helpers repo is just a starting point and suggestion,
>> as I mentioned in that other thread.
>>
>> It's kind of an invitation to share and contribute, yes, and with your
>> permission I would like to add your script(s) as well.
> Find attached, the main backup.sh script I wrote the majority of 14 years 
> ago. Make a link to it named flush.sh, it checks to see how it was 
> called and changes its behaviour accordingly.
>
> The idea was to append to an existing tape, just generated by amanda, the 
> database and configuration that generated THIS backup, aiding our 
> ability to do an uptodate, not a day old, bare metal recovery to a new 
> disk, following a bare install to get the rest of the tools needed. It, 
> until a recent perl breakage, has Just Worked here for 14 years now, and 
> I have done that bare metal recovery 3 times following the death of a 
> boot drive,
>
>> We can discuss if all the scripts should be copied there or if a mix
>> of scripts and a link collection also does the trick.
> I too have a list of bash utility scripts, like one to prepare a new 
> disk, out of the bag, with the amanda vtape file structure.  Since 
> backup.sh is only 8k, I'll append that one too. Edit to suit your 
> situation of course. Also attached is gene.conf, rename and edit to fit 
> your install. Call it a template or whatever...
>
>> thanks for the feedback ;-)
>
>
> Copyright 2019 by Maurice E. Heskett
> Cheers, Gene Heskett


Re: Amanda scripts collection(s)?

2020-12-20 Thread Charles Curley
On Sun, 20 Dec 2020 10:47:40 +0100
"Stefan G. Weichinger"  wrote:

> It's kind of an invitation to share and contribute, yes, and with
> your permission I would like to add your script(s) as well.

Yes, of course. Thanks for taking this on.

> We can discuss if all the scripts should be copied there or if a mix
> of scripts and a link collection also does the trick.

I think both, with the reminder that links do rot as web sites die off.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/


Re: Amanda scripts collection(s)?

2020-12-20 Thread Gene Heskett
On Sunday 20 December 2020 04:47:40 Stefan G. Weichinger wrote:

> Am 18.12.20 um 20:03 schrieb Charles Curley:
> > Has anyone collected Amanda helper scripts? I see "Stefan G.
> > Weichinger"  just posted Gene Heskett
> > 's helper script on github.
> > https://github.com/stefangweichinger/amanda-helpers/blob/master/gene
> >s_helper.sh
> >
> > I have my vtape builder script on my blog, and may yet post more.
> > http://charlescurley.com/blog/tag/amanda.html
> >
> > Is anyone collecting these? I did not see anything obvious in a
> > quick peruse of the wiki.
> > https://wiki.zmanda.com/index.php/Main_Page
>
> Well, the wiki is maintained by Betsol, I assume ...

I'm not sure I'd bet on it, Stefan. This bunch of amateurs may not know 
what a wiki even is.

> My tiny amanda-helpers repo is just a starting point and suggestion,
> as I mentioned in that other thread.
>
> It's kind of an invitation to share and contribute, yes, and with your
> permission I would like to add your script(s) as well.

Find attached, the main backup.sh script I wrote the majority of 14 years 
ago. Make a link to it named flush.sh, it checks to see how it was 
called and changes its behaviour accordingly.

The idea was to append to an existing tape, just generated by amanda, the 
database and configuration that generated THIS backup, aiding our 
ability to do an uptodate, not a day old, bare metal recovery to a new 
disk, following a bare install to get the rest of the tools needed. It, 
until a recent perl breakage, has Just Worked here for 14 years now, and 
I have done that bare metal recovery 3 times following the death of a 
boot drive,

> We can discuss if all the scripts should be copied there or if a mix
> of scripts and a link collection also does the trick.

I too have a list of bash utility scripts, like one to prepare a new 
disk, out of the bag, with the amanda vtape file structure.  Since 
backup.sh is only 8k, I'll append that one too. Edit to suit your 
situation of course. Also attached is gene.conf, rename and edit to fit 
your install. Call it a template or whatever...

> thanks for the feedback ;-)



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 
#!/bin/bash
# script copyright 2006 Gene Heskett, License=GPLv2
# This script has two names as there is a softlink to it called "flush.sh"
# if it doesn't exist, please do an 
# ln -s backup.sh flush.sh
# This is the script that you run from your user amanda's crontab
# Either as backup.sh, or as flush.sh but that will usually be a hand operation.
# note, this must be run as the backup user, root=illegal
# since I'm always forgetting to su amanda...

if [ `whoami` != 'amanda' ] ; then
echo
echo " Warning !!"
echo $0" needs to be executed by the user amanda,"
echo $0" exiting."
exit 1
fi
Cmdholdit="/opt/trinity/bin/dcop kmail KMailIface pauseBackgroundJobs"
Cmdresume="/opt/trinity/bin/dcop kmail KMailIface resumeBackgroundJobs"
PATH=/usr/local/sbin:/GenesAmandaHelper-0.61/:/bin:/usr/bin
export PATH
echo PATH=$PATH
$Cmdholdit
# a shell wrapper for amdump
echo $0 is being started with argument $1

# a quicker missing config exit
if [[ $# -lt 1 ]] ; then
	echo This script needs a valid config name as an argument, its missing
	exit 1
fi

# source gene.conf
. /GenesAmandaHelper-0.61/gene.conf
echo "35 MYDIR="$MYDIR
echo "36 AM_SBIN_DIR="$AM_SBIN_DIR
echo "37 DUMMY="$DUMMY
echo "38 PERFORM="$PERFORM
echo "39 BASE_CONFPATH="$BASE_CONFPATH
INDICE_PATH=$INDICE_PATH/$1
echo "36 indice_path="$INDICE_PATH
TAPELIST=$BASE_CONFPATH/$1/tapelist
echo "43 TAPELIST="$TAPELIST
echo "44 RUN_AMVERIFY="$RUN_AMVERIFY
echo "45 VTAPES="$VTAPES
echo "46 VTAPE_LOCATION="$VTAPE_LOCATION
echo "47 LOGpath="$LOG
LOG=$LOG"log4gene"
echo "449LOG="$LOG
date=`date +"%d/%m/%y %H:%M:%S"`
echo "51 $0 started on $date with arg $*" > $LOG

# Get the config name from command line arg #1,
# just like all other am* commands. Also handle host & disk
# args and pass to amcheck and amdump

if [ $# -lt 1 ] ; then
	echo "58 The amanda configuration MUST be the first argument to this script"
	exit 1
else
	CONFIGNAME=$1
	CONFPATH=$BASE_CONFPATH/${CONFIGNAME}
	echo "63 CONFPATH="$CONFPATH > $LOG
	HOST=""
	DLE=""
fi

if [ $# -gt 1 ] ; then
	HOST="$2"
fi
echo  "71 HOST="$HOST >> $LOG
if [ $# -gt 2 ] ; then
	DLE="$3"
fi
echo "75 DLE="$DLE >> $LOG
# temp, check data so far

echo "First put the tapelist in order with a run of amcheck" >> $LOG
echo "79 running ${AM_SBIN_DIR}/amcheck $CONFIGNAME $HOST $DLE" >> $LOG
${AM_SBIN_DIR}/amcheck $CONFIGNAME $HOST $DLE >> $LOG
echo "line 81 Back in "$0" - and the lists should be sane" >> $LOG
if [ -f $TAPELIST ] ;

Re: Amanda scripts collection(s)?

2020-12-20 Thread Stefan G. Weichinger

Am 18.12.20 um 20:03 schrieb Charles Curley:

Has anyone collected Amanda helper scripts? I see "Stefan G.
Weichinger"  just posted Gene Heskett
's helper script on github.
https://github.com/stefangweichinger/amanda-helpers/blob/master/genes_helper.sh

I have my vtape builder script on my blog, and may yet post more.
http://charlescurley.com/blog/tag/amanda.html

Is anyone collecting these? I did not see anything obvious in a quick
peruse of the wiki. https://wiki.zmanda.com/index.php/Main_Page


Well, the wiki is maintained by Betsol, I assume ...

My tiny amanda-helpers repo is just a starting point and suggestion, as 
I mentioned in that other thread.


It's kind of an invitation to share and contribute, yes, and with your 
permission I would like to add your script(s) as well.


We can discuss if all the scripts should be copied there or if a mix of 
scripts and a link collection also does the trick.


thanks for the feedback ;-)