Backing up the vCenter Server Appliance (vCSA)

vcsa

<update 13 november 2014>

VMware does not support backing up the individual components and restoring them to a newly deployed appliance. Use of image-based backup and restore is the only solution supported for performing a full, secondary appliance restore (KB2034505).

Thank you, Feidhlim O’Leary (VMware), for pointing this out in the comments.

</update 13 november 2014>

 
Last week I was upgrading an old ESX 4.1 environment to ESXi 5.5 and the vCenter server needed to be replaced by the vCenter Server Appliance (vCSA). The new limitations on the 5.5 release should suffice for a lot of environments, the only downsides being no Heartbeat, Linked Mode, VUM and IPv6.

After deploying and configuring the appliance, I soon realized there wasn’t a single article that listed all the necessary post-installation backup tasks. Someone not as smart as you will eventually break your appliance, so make sure to perform all following tasks.

1. Back up vPostgres database
Reference: KB2034505

  1. Connect to the vCenter Server Appliance via SSH
  2. Stop the vCenter Server service
    service vmware-vpxd stop
  3. Navigate to the vPostgres utility directory
    cd /opt/vmware/vpostgres/1.0/bin
  4. Display the vPostgres database configuration file
    cat /etc/vmware-vpx/embedded_db.cfg
  5. For the following command, replace EMD_DB_INSTANCE and EMB_DB_USER with the values listed in step 4
    ./pg_dump EMB_DB_INSTANCE -U EMB_DB_USER -Fp -c > /tmp/VCDBackUp
    When promted, enter the EMB_DB_PASSWORD , listed in step 4
  6. Connect to the vCenter Server Appliance via WinSCP and download /tmp/VCDBackUp

 

2. Back up SSO configuration
Reference: KB2063260

 

3. Back up Inventory Service database
Reference: KB2062682

  1. Stop the vCenter Inventory Service
    service vmware-inventoryservice stop
  2. Back up the vCenter Inventory Service database
    cd /usr/lib/vmware-vpx/inventoryservice/scripts/
    ./backup.sh -file /tmp/InventoryServiceDB.DB
  3. Using WinSCP copy /tmp/InventoryServiceDB.DB
  4. Start the vCenter Inventory Service
    service vmware-inventoryservice start

N.B. You can recreate the Inventory Service database as described in KB2037952, however you will lose all your Web Client tags! Also don’t use this option if you are using vCloud Director and Storage Profiles, for the Managed Object IDs are stored in this database.

 

4. Back up SSL certificates

  1. Using WinSCP back up the contents of /etc/vmwarevpx/ssl

Good luck!

Show 3 Comments

3 Comments

  1. Feidhlim O'Leary

    Hi Rutger,

    For a complete backup of a vCenter Server Appliance, VMware only supports full VM Level backup and restore of the VM.
    VMware does not support backing up the individual components and restoring them to a newly deployed appliance. This is stated at the top of KB2034505 and KB2063260 is removed as such.

    Would appreciate if you include a disclaimer that states the same.

    Thanks,
    Feidhlim

  2. Rutger Kosters

    Thanks for your comment Feidhlim, I’ve updated the article. 🙂

  3. patrick ryan

    How can you expand hdd for sda and keep vcenter under 100%

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.