VMware Cloud Director 10.x
This issue occurs because the sudo command throws an error when attempting to access the root user's home directory while running as the postgres user. As a result, the certificate ID variable ends up containing an error message instead of the expected UUID. The problem becomes apparent when a sanity check is performed on the variable's contents and fails to detect a valid UUID.
To resolve this issue modify the way sudo is invoked, follow the below steps:
cd /opt/vmware/appliance/bincreate-backup.sh by copping it to another file # cp create-backup.sh create-backup.bakvi create-backup.sHTTP_CERT_ID=$(sudo -u postgres psql -d vcloud -A -t -c "$HTTP_CERT_ID_SQL")JMX_CERT_ID=$(sudo -u postgres psql -d vcloud -A -t -c "$JMX_CERT_ID_SQL")
TO:HTTP_CERT_ID=$(sudo -Hiu postgres psql -d vcloud -A -t -c "$HTTP_CERT_ID_SQL")JMX_CERT_ID=$(sudo -Hiu postgres psql -d vcloud -A -t -c "$JMX_CERT_ID_SQL") 5. Write changes and exit the file.
:wq
Try to run the crontab again and the backup should now work.