[Bio-Linux] Cron and Qiime

Cox, Michael J michael.cox1 at imperial.ac.uk
Fri Oct 1 10:02:09 EDT 2010


Hi Tony,

That was the case, I've edited:

backup_filesystems=(${FILESYSTEMS:="/home /var /usr"})

to read:

backup_filesystems=(${FILESYSTEMS:="/home" "/var" "/usr"})

Running as root:

./backup: line 119: backups[@]: unbound variable

which seems to refer to the following section of backup

# dump each directory, one at a time
for item in "${backups[@]}"; do
    basename=`basename $item`

    #sync or swim
    sync
    /sbin/dump -"$level" -"$compression_mode" -n -u -f "$backup_destination/$basename.bak.$level" "$item"
done

so I seem to be creeping closer to a conclusion?

Thanks

Mike


________________________________________


Message: 2
Date: Thu, 30 Sep 2010 15:12:31 +0100
From: Anthony Pemberton <A.J.Pemberton at bham.ac.uk>
Subject: Re: [Bio-Linux] Cron and Qiime
To: Bio-Linux help and discussion <bio-linux at nebclists.nerc.ac.uk>
Message-ID:
        <3A5B0BBDAF00724AB5F10155650102300216806C1D at LESMBX1.adf.bham.ac.uk>
Content-Type: text/plain; charset="us-ascii"

Mike,

OK cron is running. This looks like the problem I encountered with the script /etc/cron.daily/backup - under
#What to backup
backup_filesystems=(${FILESYSTEMS:="/home" "/home1"})

Note the use of the double quotes around the partitions you want to backup (these are the mount points). If I remember correctly, the quotes were missing and are now required. I think that is why the script is failing. The default config is a "red-herring" because what the script is saying is: if the file exists read it, if not continue.

The way to quickly test the script after editing is to run it from the command line eg.

% sudo -i
# cd /etc/cron.daily
# ./backup

and see what happens. Use of echo statements in shell scripts like this helps to debug,

Regards,

Tony P.


-----Original Message-----
From: bio-linux-bounces at nebclists.nerc.ac.uk [mailto:bio-linux-bounces at nebclists.nerc.ac.uk] On Behalf Of Cox, Michael J
Sent: 30 September 2010 13:03
To: bio-linux at nebclists.nerc.ac.uk
Subject: Re: [Bio-Linux] Cron and Qiime

Thanks so much for your help Anthony,

cron is running:

root      1267     1  0 Sep28 ?        00:00:00 cron

and sudo start cron gave: cron is already running.


Checking cron.daily/backup the backup destination is backup_destination=${DESTINATION:="/backups"}

and checking fstab, this does seem to exist and to be mounted:

/dev/sdb1       /backups        ext4    defaults,noauto 0       2

However cron.daily/backup also lists a config file:

# Source configuration file
CONFIG=/etc/default/backup
if [ -r $CONFIG ]; then
    . $CONFIG
fi

Which doesn't exist in /etc/default/backup - could this be the source of the problem?  mount /backups gives the same empty Lost+found directory.

Thanks to you too Bela,

Helpdesk it is, non-virtualbox qiime looks to be a slippery customer :)

Cheers

Mike



More information about the Bio-linux-list mailing list