8.7. Backing Up and Restoring the Oracle VDI Database

8.7.1. Backing Up the Oracle VDI Database
8.7.2. Restoring the Oracle VDI Database

As with all data, it is important to back up the Oracle VDI database periodically so that you can recover in the event of a failure. This is also an important step if you plan to reinstall Oracle VDI.

The information in this section should be used for both the embedded Oracle VDI MySQL Server database and a remote MySQL database. To learn more about Oracle VDI database configurations, see Section 2.1, “About Oracle VDI Centers and Hosts”.

8.7.1. Backing Up the Oracle VDI Database

Before You Begin

  • If the Oracle VDI Center contains multiple hosts, the backup only needs to be performed on one host.

  • The backup only archives the content of the Oracle VDI database. The virtual machine configuration settings and disks for both desktops and templates are not backed up.

  • The backup job stops all other jobs in the Oracle VDI Center. Jobs are automatically started again after the backup finishes.

Oracle VDI Manager Steps

  1. In Oracle VDI Manager, select Settings, select the Oracle VDI Center and then select the Database tab.

  2. In the VDI Database Backup section, click the Backup button.

    The VDI Database Backup window is displayed.

    By default, the backup job creates a zip file on the host, /var/tmp/vdi-backup-timestamp.zip.

    Use the Path and Name fields to specify a different directory or file name.

    Use the Server field to create the backup on an NFS share on a different host. The NFS share must be accessible from the host on which you create the backup job.

  3. Click OK.

Command Line Steps

  • Run the vda-backup command as root.

    # /opt/SUNWvda/sbin/vda-backup [-p path] [-o filename] [-s host]

    By default, the backup job creates a zip file, /var/tmp/vdi-backup-timestamp.zip.

    Use the -p and -o options to specify a different directory or file name.

    Use the -s option to create the backup on an NFS share on a different host. The NFS share must be accessible from the host on which you create the backup job.

    For example:

    # /opt/SUNWvda/sbin/vda-backup -s storage.example.com -p /export/vdi-backups

    The above command creates a database backup in the following location:

    /net/storage.example.com/export/vdi-backups/vdi-backup-timestamp.zip

8.7.2. Restoring the Oracle VDI Database

Before You Begin

  • If the Oracle VDI Center contains multiple hosts, you can restore the database on any host. Only restore the database from one host.

  • Make sure you restore from the latest database backup.

  • Desktops created after the database backup was taken are not restored and result in orphaned disks that have no desktop.

  • Desktops deleted after the database backup was taken are restored and result in orphaned desktops that have no disk.

  • All user assignments to desktops after the database backup was taken are lost.

  • All jobs that are currently running in the Oracle VDI Center are canceled.

  • The restore job stops Oracle VDI services in the Oracle VDI Center, however active sessions continue to run. When a restore job finishes, you must restart the Oracle VDI service on all hosts.

Currently it is not possible to restore the Oracle VDI database using Oracle VDI Manager.

Command Line Steps

  1. Run the vda-restore command as root.

    # /opt/SUNWvda/sbin/vda-restore -i path-to-backup.zip
  2. After the restore job finishes, restart the Oracle VDI service on all hosts.

    Run the following command as root:

    # /opt/SUNWvda/sbin/vda-service restart