You can store the backup on the local storage (up to five latest backup files), SSH or FTP servers. You can start the backup immediately or schedule a periodic backup, like daily or weekly .
Prerequisites
- The backup and restore setups must have the identical versions.
- The restore setup must be a fresh deployment to avoid any inconsistencies. Take the snapshots of the VMs before you run the restore commands.
- Only Admin user and Console user can configure backup and restore through public APIs and CLI commands respectively. The Auditor user can see if any backup and restore configuration exists on the setup.
Procedure
- Trigger the backup process.
Method Description Using CLI command backup-restore backup --action add --path <config-file-path>
For additional CLI commands, see the CLI Documentation.
Create a backup configuration file on one of the platform nodes under /home/ubuntu. To create the file, you must login as Support user.Note: To run the CLI commands, you must log in as a Console user on the same platform where you created the backup configuration file.Using API See settings/backup on the API Reference page. Note: You must provide the configuration as the JSON body in the API request.Table 1. Configurations for the backup process Scenario Description File Configuration Configuration to trigger backup Creates the backup file on local file server in the default directory, /var/lib/backup-restore or
any user specified backup directory{"backup_file_server_type"
:
"LOCAL"
}or
{"backup_file_server_type": "LOCAL", "local_file_server": { "backup_directory": "backup_directory_path" } }
Creates the backup on FTP server in the user specified backup directory { "backup_file_server_type": "FTP", "ftp_file_server": { "server_address": "IP address", "port": port_number, "username": "username", "password": "password", "backup_directory": "backup_directory_path" } }
Creates the backup on SSH server in the user specified backup directory "backup_file_server_type": "SSH", "ssh_file_server": { "server_address": "IP address", "port": port_number, "username": "username", "password": "password", "backup_directory": "backup_directory_path" }
Configuration to schedule the backup process Immediate Backup
"schedule_now": true,
Daily Backup The permissible value for hour : 0-23 The permissible value for minute : 0-59
"backup_schedule": { "schedule_period": "DAILY", "hour": 16, "minute": 51 },
Weekly Backup The permissible value for hour : 0-23 The permissible value for minute : 0-59 The permissible value for day_of_week : 1(Sunday) - 7 (Saturday)
"backup_schedule": { "schedule_period": "WEEKLY", "hour": 16, "minute": 56, "day_of_week": 3 },
Backup only few configurations Under the data_filter parameter in the configuration file, set the configuration to true to backup selected configurations. To skip the backup of a particular configuration, set the value to false. Note: If you do not specify the data_filter parameter, vRealize Network Insight backs up all the configurations."data_filter": { "snmp": true, "smtp": true, "data_sources": false, "events": false, "syslog": true, "ldap": true, "vidm": true, "user_data": true, "physical_subnet_vlan": true, "physical_ip_dns_mapping": true, "system_configuration": true, "east_west_ip": false, "north_south_ip": true, "data_management": true, "online_update_status": true, "ceip_status": true, "audit_logs_pii_status": false }
An example of the configuration file for a weekly backup (every Tuesday) on a FTP server with selected configurations.{ "backup_schedule": { "schedule_period": "WEEKLY", "hour": 16, "minute": 56, "day_of_week": 3 }, "backup_file_server_type": "FTP", "ftp_file_server": { "server_address": "10.125.48.146", "port": 22011, "username": "testuser", "password": "password!", "backup_directory": "/backup" }, "data_filter": { "snmp": true, "smtp": true, "data_sources": false, "events": false, "syslog": true, "ldap": true, "vidm": true, "user_data": true, "physical_subnet_vlan": true, "physical_ip_dns_mapping": true, "system_configuration": true, "east_west_ip": false, "north_south_ip": true, "data_management": true, "online_update_status": true, "ceip_status": true, "audit_logs_pii_status": false } }
- Trigger the restore process.
Method Description Using CLI command backup-restore restore --action add --path <config-file-path>
For additional CLI commands, see the CLI Documentation.
Create a restore configuration file on one of the platform nodes under /home/ubuntu. To create the file, you must login as Support user.Note: To run the CLI commands, you must log in as a Console user on the same platform where you created the restore configuration file.Using API See settings/restore on the API Reference page. Note: You must provide the configuration as the JSON body in the API request.Table 2. Configurations for the restore process Scenario Description File Configuration Configuration to trigger restore Restores from local file server { "backup_file_server_type": "LOCAL", "local_file_server": { "backup_directory": "backup_directory_path", "backup_file_name": "file_name.tar" } }
Restores from FTP file server { "backup_file_server_type": "FTP", "ftp_file_server": { "server_address": "IP address", "port": port_number, "username": "username", "password": "password", "backup_directory": "backup_directory_path" "backup_file_name": "file_name.tar" } }
Restores from SSH file server "backup_file_server_type": "SSH", "ssh_file_server": { "server_address": "IP address", "port": port_number, "username": "username", "password": "password", "backup_directory": "backup_directory_path" "backup_file_name": "file_name.tar" }
Restore only few configurations Under the data_filter parameter in the configuration file, set the configuration to true to restore selected configurations. To skip the restore of a particular configuration, set the value to false. Note: If you do not specify the data_filter parameter, vRealize Network Insight restores all the configurations."data_filter": { "snmp": true, "smtp": true, "data_sources": false, "events": false, "syslog": true, "ldap": true, "vidm": true, "user_data": true, "physical_subnet_vlan": true, "physical_ip_dns_mapping": true, "system_configuration": true, "east_west_ip": false, "north_south_ip": true, "data_management": true, "online_update_status": true, "ceip_status": true, "audit_logs_pii_status": false }
Note: If you do not specify thecollector_mapping
parameter, all the restored data sources will be mapped to a random collector on the restore setup."collector_mapping": { "default_collector": "default_collector_ip", "mappings": [ { "source": "source_collector_ip", "destination": "destination_collector_ip" } ] }
If you specifycollector_mapping
, all data sources mapped tosource_collector_ip
on the backup setup will be mapped todestination_collector_ip
on the restore setup. If mapping is not specified for any collector on the backup setup, the corresponding data sources will be mapped to thedefault_collector
on the restore setup. You can specify mapping for multiple source collectors to destination collectors.An example of the configuration file to restore from a FTP server with selected configurations."backup_file_server_type": "FTP", "ftp_file_server": { "server_address": "10.120.18.146", "port": 22011, "username": "testuser", "password": "Password!", "backup_directory": "/backup" "backup_file_name": "vrni_backup-19801-10.79.197.0-2020-08-26-06.56.44.tar" }, "collector_mapping": { "default_collector": "10.120.135.2", "mappings": [ { "source": "10.134.135.3", "destination": "10.120.2.120" } ] }, "data_filter": { "snmp": true, "smtp": true, "data_sources": false, "events": false, "syslog": true, "ldap": true, "vidm": true, "user_data": true, "physical_subnet_vlan": true, "physical_ip_dns_mapping": true, "system_configuration": true, "east_west_ip": false, "north_south_ip": true, "data_management": true, "online_update_status": true, "ceip_status": true, "audit_logs_pii_status": false } }