Hi Proxmox.
Today i have found a problem when i try to run a script in crontab which
run perfectly from the shell.
The script i run from crontab are doing the following.
_______________________________________
#!/bin/bash
file="/backuptest.log"
PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin:/mnt/sysimage/usr/X11R6/bin:/sbin:/usr/sbin:/usr/local/bin:/myshell:/myperl
export PATH
echo "__________________" >> $file
date=`date`;
echo "starting Backup $date" >> $file
cmd="/usr/bin/mysql-zrm-scheduler --now --backup-set cashserver"
path="$PATH"
echo $path >> $file
echo $cmd >> $file
$cmd
date=`date`;
echo "stopper Backup $date" >> $file
_______________________________________
it runs perfectly form shell /myshell/new_bk and i runs perfectly for
crontab on the HOST machine
53 15 * * * /usr/sbin/vzctl exec 110 '/myshell/new_bk'
but when i tried to run it for the GUEST the best i got from zmanda logging
is :
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: START OF BACKUP
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: PHASE START: Initialization
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: Mail address: **************** is ok
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: ZRM Temporary configuration file = /etc/mysql-zrm/cashserver/tmpKnOdE.conf
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: {
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: verbose=1
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: retention-policy=3D
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: tmpdir=/mnt/samba/mysql-zrm/tmp
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: destination=/mnt/samba/mysql-zrm
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: password=******
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: backup-mode=raw
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: backup-type=regular
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: compress-plugin=/usr/bin/gzip
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: user=root
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: quiet=0
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: backup-level=0
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: mailto=***********
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: databases=cashserver
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: html-reports=backup-status-info
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: host=localhost
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: socket=/tmp/mysql.sock
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: html-report-directory=/mnt/samba/web/reports/
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: compress=/usr/bin/gzip
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: mysql-binlog-path=/mnt/samba/mysql
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: }
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: Getting mysql variables
Does someone has a clever solution ?????
It's not to do with the path cause is actually try to run the program
but just crashes....
Thanks.
/Michael
Today i have found a problem when i try to run a script in crontab which
run perfectly from the shell.
The script i run from crontab are doing the following.
_______________________________________
#!/bin/bash
file="/backuptest.log"
PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin:/mnt/sysimage/usr/X11R6/bin:/sbin:/usr/sbin:/usr/local/bin:/myshell:/myperl
export PATH
echo "__________________" >> $file
date=`date`;
echo "starting Backup $date" >> $file
cmd="/usr/bin/mysql-zrm-scheduler --now --backup-set cashserver"
path="$PATH"
echo $path >> $file
echo $cmd >> $file
$cmd
date=`date`;
echo "stopper Backup $date" >> $file
_______________________________________
it runs perfectly form shell /myshell/new_bk and i runs perfectly for
crontab on the HOST machine
53 15 * * * /usr/sbin/vzctl exec 110 '/myshell/new_bk'
but when i tried to run it for the GUEST the best i got from zmanda logging
is :
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: START OF BACKUP
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: PHASE START: Initialization
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: Mail address: **************** is ok
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: ZRM Temporary configuration file = /etc/mysql-zrm/cashserver/tmpKnOdE.conf
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: {
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: verbose=1
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: retention-policy=3D
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: tmpdir=/mnt/samba/mysql-zrm/tmp
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: destination=/mnt/samba/mysql-zrm
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: password=******
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: backup-mode=raw
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: backup-type=regular
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: compress-plugin=/usr/bin/gzip
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: user=root
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: quiet=0
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: backup-level=0
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: mailto=***********
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: databases=cashserver
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: html-reports=backup-status-info
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: host=localhost
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: socket=/tmp/mysql.sock
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: html-report-directory=/mnt/samba/web/reports/
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: compress=/usr/bin/gzip
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: mysql-binlog-path=/mnt/samba/mysql
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: }
Thu Jun 25 16:12:01 2009: cashserver:backup:INFO: Getting mysql variables
Does someone has a clever solution ?????
It's not to do with the path cause is actually try to run the program
but just crashes....
Thanks.
/Michael