VMware Cloud Community
ricardoclaus
Contributor
Contributor

Scheduling script ghettoVCB

Dear,

I'm having trouble scheduling a sh script in crond.

My Environment: ESXi 6.0

In my file: / var / spool / cron / crontabs / root

I put this line:

25 13 * * * * /backup/ghettoVCB.sh -g /backup/ghettoVCB.conf -f / backup / vmlistbkp

In syslog.log I see this:

2017-08-04T13: 25: 01Z crond [23739929]: crond: USER root pid 23740194 cmd * /backup/ghettoVCB.sh -g /backup/ghettoVCB.conf -f / backup / vmlistbkp

I have already given execute permission to ghettoVCB.sh

The backup does not occur when run by crond.

When you manually squeeze, the backup occurs perfectly.

Could someone tell me what I'm doing wrong?

Tags (2)
0 Kudos
3 Replies
parmarr
VMware Employee
VMware Employee

Hello, see if any details on the link ghettoVCB.sh - Free alternative for backing up VM's for ESX(i) 3.5, 4.x & 5.x helps

Sincerely, Rahul Parmar VMware Support Moderator
0 Kudos
ricardoclaus
Contributor
Contributor

Hello,

My backup script was created based on the link you indicated. Even following the references of Cron Job, I am still in difficulties.

Anyone have any tips?

0 Kudos
shaki1989
Contributor
Contributor

edit  /var/spool/cron/crontabs/root

00 20 * * * /vmfs/volumes/datastorename/ghetto-VCB-master/ghettoVCB.sh -f  /vmfs/volumes/datastorename/ghetto-VCB-master/vmbackup > /vmfs/volumes/backupdatastore/vmbackups/logs/backup-$(date +\%s).log

You have to create it in a backup datastore. 

vmbackups/logs

vmbackups/"virtual machine name"

0 Kudos