VMware vSphere

 View Only
  • 1.  Automate vCenter Backup restore

    Posted Jan 07, 2025 08:48 AM

    Hello,

    In a client environment, a vCenter backup has been successfully taken and stored on an FTP server. The objective is to determine whether there is a way to automate the restoration process for this backup.

    The vCenter installer DVD offers two approaches for restoring a backup:

    1. /vcsa-ui-installer - Graphical User Interface installer for vCenter Server Appliance
    2. /vcsa-cli-installer - Command Line Interface installer for vCenter Server Appliance

    While it is possible to manually restore the backup using the GUI installer, the requirement here is to execute the restoration via the CLI. The available CLI JSON templates support installation, migration, and upgrades, but there doesn't seem to be a predefined template for performing a restore operation.

    Could you please confirm if there is an official method or any alternative procedure to restore a vCenter backup through the CLI?

    Thank you in advance for your assistance!



  • 2.  RE: Automate vCenter Backup restore
    Best Answer

    Posted Jan 07, 2025 09:41 AM
    Edited by Nathanael Pacheco Jan 07, 2025 10:07 AM

    Yes, it is possible to automate the restore process; however, there doesn't appear to be a dedicated CLI-based method available for this purpose. The reason for this limitation is unclear, though it could be attributed to the fact that restores are generally performed infrequently.

    That said, the VCSA API can be utilized to achieve the same goal. More details about this approach can be found in the documentation here:
    https://developer.broadcom.com/xapis/vsphere-automation-api/latest/appliance/recovery/restore-job/" href="https://developer.broadcom.com/xapis/vsphere-automation-api/latest/appliance/recovery/restore-job/" rel="noreferrer noopener" target="_blank" class="fui-Link ___1q1shib f2hkw1w f3rmtva f1ewtqcl fyind8e f1k6fduh f1w7gpdv fk6fouc fjoy568 figsok6 f1s184ao f1mk8lai fnbmjn9 f1o700av f13mvf36 f1cmlufx f9n3di6 f1ids18y f1tx3yz7 f1deo86v f1eh06m1 f1iescvh fhgqx19 f1olyrje f1p93eir f1nev41a f1h8hb77 f1lqvz6u f10aw75t fsle3fq f17ae5zn" title="https://developer.broadcom.com/xapis/vsphere-automation-api/latest/appliance/recovery/restore-job/">https://developer.broadcom.com/xapis/vsphere-automation-api/latest/appliance/recovery/restore-job/

    The process essentially mirrors the steps followed in the UI workflow. First, deploy the VCSA appliance in an unconfigured state (Stage 1 only), assigning it a temporary IP address. Once the VAMI API endpoint becomes accessible, it can then be used to trigger the restore operation via the API referenced above.

     

    Let me know if you need any further tweaks! I hope I helped you.



    ------------------------------
    Francesco Grimaldi
    VMware Certified Instructor
    VMware vExpert
    ------------------------------