I am trying to put in a cron job to run zenbackup nightly as the zenoss user. 
Unfortunately this is not working. At first I thought it was because the zenoss 
environment variables set in the zenoss user profile .bashrc weren't being 
picked up by cron, but I added them to the backup script directly, so this 
should not be the case. However, the job continues to fail. What am I missing? 


The crontab entry is:

# Run Zenoss backup daily
0 23    * * *   zenoss  /usr/local/bin/zenoss-backup /home/backup

The zenoss-backup script is:

#!/bin/bash
# Backs up the Zenoss databases (Zeo and MySQL).

export ZENHOME=/usr/local/zenoss
export PYTHONPATH=$ZENHOME/lib/python
export PATH=$ZENHOME/bin:$PATH

MINPARAMS="1"

if [ $# -lt "$MINPARAMS" ]
then
        echo "zenoss-backup /path/to/backup/folder"
else
        $ZENHOME/bin/zenbackup --save-mysql-access 
--file=${1}/zenoss-backup_`date +%Y-%m-%dT%H-%M-%S`.tgz
fi




-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=12260#12260

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to