TheAI Stack

FIELD NOTES BY AVNISH TRIPATHI

 

Apart from NSX Manager backup and restore procedure , I was looking for a procedure to backup and restore NSX edge appliances.Here is the API way to do this…. (this may not be supported by VMware)

Backup NSX Edge Configuration-

To get edge configuration of a specified edge using REST API, use the following rest API call.

Request type: GET https://<nsxmgr-ip>/api/4.0/edges/<Edge-id>

get_edge

Save the response body (output) as backed up configuration in a file.

Note : Backup the edge certificates , passkeys and passphrase outside of NSX as the edge certificates are not exported  as  part of the REST call.

How to Restore Edge Configuration-

To deploy a new edge using backed up configuration in the above step, use the following rest API call with the saved backed up configuration inside the API call body.

Before pasting the backup in the request body make the following changes……

Remove the section <id><edge-id></id>

remove

Add a new section <password>your 12 digit password </password> inside <cliSettings></cliSettings>

Example:

 

passw

you must remove the section <clientSsl></clientSsl> in the Application Profiles inside Load-Balancer if exists.

clientssl

Now go to your API client and

Request type: POST   and URL – https://<nsxmgr-ip>/api/4.0/edges/
where body is the backed up configuration with the above modifications.

send

if above goes well , it will deploy edge with existing configuration and response will be like this.

created

then user will have to go to the NSX UI and self sign the certificate or import the certificate. If the certificate was associated to an application profile, the user will have to do the same via UI.

 

THE AI STACK · BY EMAIL

Get the next field note

New guides on private cloud, Kubernetes and enterprise AI, delivered when I publish. Subscribe free and unsubscribe anytime.

Enter your email and confirm your subscription in the message from WordPress.com.

Comments

6 responses to “NSX Edge Backup and Restore”

  1. Ahmed Gaziyani Avatar
    Ahmed Gaziyani

    Good going sir

  2. Avinash Avatar
    Avinash

    Well written ,really helpful.

  3. Anil Shetty Avatar
    Anil Shetty

    Superb.. Expecting many more such articles.

  4. […] to backup NSX Edge configuration, particularly when many firewall rules inside. i look through this blog, it can be done with API.According API Guide, to get nsx edge, query should be like […]

  5. Sam Avatar
    Sam

    Hi!
    Unfortunately I got the error doing this API request.
    I remove the line with xml version from the body.
    The error is –
    224Invalid request syntax.For input string: ""

    I can’t still find the solution.

    1. vmtechie Avatar

      This Article is old, APIs might have changed with latest version…so you will have to relook the payload which is correct.

Leave a Reply

The AI Stack · Independent field notes by Avnish Tripathi

About   /   Contact