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

Inhaltsverzeichnis

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/') 

Newsletter abonnieren

Immer auf dem Laufenden und Top informiert über die Cloud

Ein starker Partner für Ihre Cloud

Kontaktieren Sie uns für ein unverbindliches Entdeckungsgespräch um mehr über unsere Lösungen zu erfahren

German