Whether you need to recover your NSX Manager from a failure or revert from changes, it is always good to have a current backup!
And if you have several NSX Managers to configure backups on, updating them using the API call will save you quite a lot of time.
NSX Manager supports setting up backups using FTP or SFTP, and to schedule them to run on an hourly,
daily or weekly frequency.
If you are looking for a FTP Server, I have used the FileZilla Server and pointed NSX Manager backups. It will support SFTP as well, check out the FileZilla info- forum.filezilla-project.org/viewtopic.php?t=8812
I have had the best success running API calls to NSX using the Firefox RESTClient. To start with-
1. Locate the RESTClient Mozilla add‐on, and add it to Firefox.
2. Click Tools > REST Client to start the add‐on.
3. Click Authentication,then Basic Authentication, and enter the NSX Manager login credentials, which then appear encoded in the Request Header.
Note: you may need to browse to the NSX Managers web ui, and accept the certificate warning before running query.
4. Select a method such as GET, POST, or PUT, and type the URL of a REST API.
Response Header, Response Body, and Rendered HTML appear in the bottom window.
5. For POST and PUT, you will need to add a Custom Header.
Select Headers, Custom header and add the name Content-Type and Value application/xml
Below is an example of adding a backup for a daily schedule:
Method PUT URL: https://nsx-manager.corp.local/api/1.0/appliance-management/backuprestore /backupsettings
Headers: Authorization: Basic Content-Type: application/xml
Body:
<backupRestoreSettings>
<ftpSettings>
<transferProtocol>FTP</transferProtocol>
<hostNameIPAddress>ftp-server.corp.local</hostNameIPAddress>
<port>21</port>
<userName>ftp-user</userName><password>my-pasword</password>
<backupDirectory>NSXBackupDir</backupDirectory>
<filenamePrefix>nsx-manager-</filenamePrefix>
<passPhrase>my-password</passPhrase> - This item was not listed in the API guide
<passiveMode>true</passiveMode>
<useEPRT>false</useEPRT>
<useEPSV>true</useEPSV>
</ftpSettings>
<backupFrequency>
<frequency>DAILY</frequency>
<hourOfDay>19</hourOfDay>
<minuteOfHour>30</minuteOfHour>
</backupFrequency>
<excludeTables>
<excludeTable>AUDIT_LOGS</excludeTable>
<excludeTable>SYSTEM_EVENTS</excludeTable>
</excludeTables>
</backupRestoreSettings>
The items in Bold are the options for your specific configuration…
To check your backup settings, just change the Method to GET, and run the same URL with the Authentication: Basic Header-
Method GET URL: https://nsx-manager.corp.local/api/1.0/appliance-management/backuprestore /backupsettings
Headers: Authorization: Basic
The configured settings will display in the Body:
<backupRestoreSettings>
<ftpSettings>
<transferProtocol>FTP</transferProtocol>
<hostNameIPAddress>ftp-server.corp.local</hostNameIPAddress>
<port>21</port>
<userName>ftp-user</userName><password>my-pasword</password>
<backupDirectory>NSXBackupDir</backupDirectory>
<filenamePrefix>nsx-manager-</filenamePrefix>
<passiveMode>true</passiveMode>
<useEPRT>false</useEPRT>
<useEPSV>true</useEPSV>
</ftpSettings>
<backupFrequency>
<frequency>DAILY</frequency>
<hourOfDay>19</hourOfDay>
<minuteOfHour>30</minuteOfHour>
</backupFrequency>
<excludeTables>
<excludeTable>AUDIT_LOGS</excludeTable>
<excludeTable>SYSTEM_EVENTS</excludeTable>
</excludeTables>
</backupRestoreSettings>
And if you have several NSX Managers to configure backups on, updating them using the API call will save you quite a lot of time.
NSX Manager supports setting up backups using FTP or SFTP, and to schedule them to run on an hourly,
daily or weekly frequency.
If you are looking for a FTP Server, I have used the FileZilla Server and pointed NSX Manager backups. It will support SFTP as well, check out the FileZilla info- forum.filezilla-project.org/viewtopic.php?t=8812
I have had the best success running API calls to NSX using the Firefox RESTClient. To start with-
1. Locate the RESTClient Mozilla add‐on, and add it to Firefox.
2. Click Tools > REST Client to start the add‐on.
3. Click Authentication,then Basic Authentication, and enter the NSX Manager login credentials, which then appear encoded in the Request Header.
Note: you may need to browse to the NSX Managers web ui, and accept the certificate warning before running query.
4. Select a method such as GET, POST, or PUT, and type the URL of a REST API.
Response Header, Response Body, and Rendered HTML appear in the bottom window.
5. For POST and PUT, you will need to add a Custom Header.
Select Headers, Custom header and add the name Content-Type and Value application/xml
Below is an example of adding a backup for a daily schedule:
Method PUT URL: https://nsx-manager.corp.local/api/1.0/appliance-management/backuprestore /backupsettings
Headers: Authorization: Basic Content-Type: application/xml
Body:
<backupRestoreSettings>
<ftpSettings>
<transferProtocol>FTP</transferProtocol>
<hostNameIPAddress>ftp-server.corp.local</hostNameIPAddress>
<port>21</port>
<userName>ftp-user</userName><password>my-pasword</password>
<backupDirectory>NSXBackupDir</backupDirectory>
<filenamePrefix>nsx-manager-</filenamePrefix>
<passPhrase>my-password</passPhrase> - This item was not listed in the API guide
<passiveMode>true</passiveMode>
<useEPRT>false</useEPRT>
<useEPSV>true</useEPSV>
</ftpSettings>
<backupFrequency>
<frequency>DAILY</frequency>
<hourOfDay>19</hourOfDay>
<minuteOfHour>30</minuteOfHour>
</backupFrequency>
<excludeTables>
<excludeTable>AUDIT_LOGS</excludeTable>
<excludeTable>SYSTEM_EVENTS</excludeTable>
</excludeTables>
</backupRestoreSettings>
The items in Bold are the options for your specific configuration…
To check your backup settings, just change the Method to GET, and run the same URL with the Authentication: Basic Header-
Method GET URL: https://nsx-manager.corp.local/api/1.0/appliance-management/backuprestore /backupsettings
Headers: Authorization: Basic
The configured settings will display in the Body:
<backupRestoreSettings>
<ftpSettings>
<transferProtocol>FTP</transferProtocol>
<hostNameIPAddress>ftp-server.corp.local</hostNameIPAddress>
<port>21</port>
<userName>ftp-user</userName><password>my-pasword</password>
<backupDirectory>NSXBackupDir</backupDirectory>
<filenamePrefix>nsx-manager-</filenamePrefix>
<passiveMode>true</passiveMode>
<useEPRT>false</useEPRT>
<useEPSV>true</useEPSV>
</ftpSettings>
<backupFrequency>
<frequency>DAILY</frequency>
<hourOfDay>19</hourOfDay>
<minuteOfHour>30</minuteOfHour>
</backupFrequency>
<excludeTables>
<excludeTable>AUDIT_LOGS</excludeTable>
<excludeTable>SYSTEM_EVENTS</excludeTable>
</excludeTables>
</backupRestoreSettings>