Similar to my last post, I found another small gem in the vRealize Network Insight 5.3 release: the ability to backup all configuration within the Platform.

Unsupported

Before you continue reading, please note that this is an unsupported feature right in 5.3. It’ll be officially supported later this year. Having said that…These new API endpoints in the API Explorer caught my eye:

Snapshots

Currently, the supported method of creating backups of Network Insight is to power down the VM, take a snapshot, backup that snapshot, and power the VM back up. Needless to say, that needs some work. I was really happy to see this feature appear in Network Insight, and after a little digging; it does exactly what I was hoping it would do!

Backup API

You can use the API endpoint /api/ni/settings/backup to configure a backup that runs on a schedule, that you can send to an SSH or FTP  server, and creates a tar file with separate files per configuration item. Among the configuration items, there are applications, pinboards, data sources, saved searches, system settings (like Syslog, SMTP, etc.), user configurations, and much more!

Here are all the configuration items:

These files are (mostly) human-readable. If you open them in a text editor, you’ll be able to make out the intended configuration. 

Restore API

Also depicted in the screenshot of the API Explorer, there is also a way to restore a previously created backup. 

PowervRNI

To make it easier to use the backup APIs; I built them into the Github version of PowervRNI (not on PowerShellGallery yet). It becomes a bit easier to set it up. Here’s an example: 

PS # $backupSchedule = @{ "enable" = $true; "schedule_period" = "DAILY"; "minute" = 30; "hour" = 12; "day_of_week" = 1 }
PS # $sshServer = @{ "server_address" = "my-ssh-server"; "port" = 22; "username" = "vrni-backups"; "password" = "VMware1!"; "backup_directory" = "/home/vrni-backups/"; "backup_file_name" = "vrni-backup.tar" }
PS # Set-vRNIBackup -RunNow $true -BackupSchedule $backupSchedule -SSHServer $sshServer

config_filter
-------------
@{applications=True; snmp=True; smtp=True; data_sources=True; analytics_thresholds=True; analytics_outliers=True; events=True; syslog=True; pinboards=True; ldap=True; vidm=True; user_data=True; user_preferences=True; physical_subnet_v…

PS # Get-vRNIBackupStatus

status status_updated_timestamp
------ ------------------------
IN_PROGRESS 1595425176027

The variable $backupSchedule defines when the backup should run. In this case, I’ve set it to a daily backup at 12:30 (24hr). Then the $sshServer variable defines the SSH server to which the Platform will copy the backup. 

Again, this feature is currently not officially supported. But, as far as I can see – it works great! 🙂 



Share the wealth!