VMware Cloud Director – Issues with database backup for Debian and Ubuntu based NFS datastores

Table of contents

There's a bug with Debian and Ubuntu based NFS datastores and the VMware Cloud Director which is known by VMware but only mentioned on a side note in the documentation Preparing the Transfer Server Storage for the VMware Cloud Director Appliance.

When you use Ubuntu or Debian based Linux distributions for the NFS, the creation of database backups might fail.

To create automated database backups without using the default script create the following python script and schedule it with cron.

Create the file and make it executable

touch /etc/cron.hourly/vcd-backup-script.py chmod u+x /etc/cron.hourly/vcd-backup-script.py

Python script for database backup

#!/usr/bin/python import os import time timestr = time.strftime("%Y%m%d-%H%M%S") filename = 'vcd-backup-' + timestr + '.sql' path = '/tmp' os.chdir(path ) os.system('sudo -u postgres /opt/vmware/vpostgres/10/bin/pg_dump -f' + filename + ' vcloud') os.system('mv /tmp/vcd-backup-* /opt/vmware /vcloud-director/data/transfer/backups/') 

Subscribe to Newsletter

Always up to date and well informed about the cloud

A strong partner for your cloud

Contact us for a free discovery call to learn more about our solutions