Amanda-Users

Another oddity from Gene

2009-10-19 08:17:30
Subject: Another oddity from Gene
From: Gene Heskett <gene.heskett AT verizon DOT net>
To: amanda-users AT amanda DOT org
Date: Mon, 19 Oct 2009 08:05:31 -0400
Greetings;

I made a movie out of a machining operation which put nearly 18GB in .avi 
files in my /usr/movies DLE.

So this mornings report for the 2nd time, notes its too big, and only wrote 
a PARTIAL, then ran out of space, and I had added another 20GB to the size 
of the vtape yesterday. I'll add another 10GB today.

But, I thought I would clean out the holding disk by doing a flush by hand, 
and found a piece of my script that has worked numerous times before, is now 
broken.

The command line issued from the /GenesAmandaHelper-0.6 directorry, as the 
use amanda is: ./flush.sh Daily

The 6 line snippet of backup.sh, which flush.sh is a softlink to is:
================
# or are we running as flush.sh

if [ $0 == "./flush.sh" ]|| [ $0 == "${MYDIR}/flush.sh" ]||[ $0 == "flush.sh" 
]; then
        # we don't want amflush to disconnect or ask questions
        if [`/bin/ls /dumps`]; then   <<<<<----line 173
                echo "Backup script running amflush -bf $CONFIGNAME " >> $LOG
=================
The if statement probably needs help but all its looking for is a non-null
response, or at least that's the theory when I wrote it and its worked
since years now.

But, now I get this return on the command line:
=================
./flush.sh: line 173: [20091019011512]: command not found
=================

and the echo line above never makes it to the log, here it is:

=================
./flush.sh started on 19/10/09 07:10:37 with arg Daily
CONFIGNAME = Daily
First put the tapelist in order with a run of amcheck
running /usr/local/sbin/amcheck Daily  
Amanda Tape Server Host Check
-----------------------------
Holding disk /dumps: 308895744 kB disk space available, using 308383744 kB
stage 1: search for oldest reusable volume
oldest reusable volume is 'Dailys-3'
changer is not fast-searchable; skipping to stage 2
stage 2: scan for any reusable volume
trying slot 3
Will write to volume 'Dailys-3' in slot 3.
NOTE: skipping tape-writable test
Server check took 1.014 seconds

Amanda Backup Client Hosts Check
--------------------------------
Client check: 2 hosts checked in 2.460 seconds.  0 problems found.

(brought to you by Amanda 2.6.2alpha)
Back in ./flush.sh - and the lists should be sane
line 72 ./flush.sh tapenum from /usr/local/etc/amanda/Daily/chg-disk-slot is 
now=3
TAPECYCLE=30
RUNTAPES=1
This script is being run as ./flush.sh
No dumps left in holding disk area, ./flush.sh has been skipped  <<---is the 
else clause of that 'if' in line 173
flush-indices-configs is done and completed successfully. <<--'echo' line is 
trash, removed now
amcheckdump run is disabled by gene.conf config.
======end of log=========

But:
[amanda@coyote Daily]$ ls /dumps
20091019011512
[amanda@coyote Daily]$ du /dumps
17856304        /dumps/20091019011512
17856312        /dumps
[amanda@coyote Daily]$ ls -lR /dumps
/dumps:
total 4
drwx------ 2 amanda amanda 4096 2009-10-19 02:35 20091019011512

/dumps/20091019011512:
total 17856300
-rw------- 1 amanda amanda     291857 2009-10-19 02:34 coyote._opt.1
-rw------- 1 amanda amanda      43008 2009-10-19 02:35 coyote._sbin.1
-rw------- 1 amanda amanda      73728 2009-10-19 02:27 coyote._usr_dlds_misc.1
-rw------- 1 amanda amanda      43008 2009-10-19 02:34 coyote._usr_dlds_rpms.1
-rw------- 1 amanda amanda      43008 2009-10-19 02:34 coyote._usr_dlds_tgzs.1
-rw------- 1 amanda amanda 2097152000 2009-10-19 02:17 coyote._usr_movies.1
-rw------- 1 amanda amanda 2097152000 2009-10-19 02:19 coyote._usr_movies.1.1
-rw------- 1 amanda amanda 2097152000 2009-10-19 02:20 coyote._usr_movies.1.2
-rw------- 1 amanda amanda 2097152000 2009-10-19 02:22 coyote._usr_movies.1.3
-rw------- 1 amanda amanda 2097152000 2009-10-19 02:23 coyote._usr_movies.1.4
-rw------- 1 amanda amanda 2097152000 2009-10-19 02:24 coyote._usr_movies.1.5
-rw------- 1 amanda amanda 2097152000 2009-10-19 02:25 coyote._usr_movies.1.6
-rw------- 1 amanda amanda 2097152000 2009-10-19 02:26 coyote._usr_movies.1.7
-rw------- 1 amanda amanda 1485770752 2009-10-19 02:27 coyote._usr_movies.1.8
-rw------- 1 amanda amanda      43008 2009-10-19 02:34 coyote._usr_music.1
-rw------- 1 amanda amanda    3428215 2009-10-19 02:33 coyote._usr_src.1

Can somebody teach me a better 'if' in line 173?

Thanks.

PS:  I would still like to be able to turn the amcheckdump option back on,
but until it loses the required cli confirmation, that's DIW.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
The NRA is offering FREE Associate memberships to anyone who wants them.
<https://www.nrahq.org/nrabonus/accept-membership.asp>

Never argue with a fool -- people might not be able to tell the difference.

<Prev in Thread] Current Thread [Next in Thread>