Avi Controller backup and restore
I will introduce Avi Networks back up and restore procedure.
It took more time than I expected.
■Confirm backup configurations
admin@10-1-1-10:~$ shell
Login: admin
Password:xxx
s[admin:10-1-1-10]: > show scheduler Default-Scheduler
+-------------------+------------------------------------------------+
| Field | Value |
+-------------------+------------------------------------------------+
| uuid | scheduler-7760b0fd-f9b1-474a-aec7-5f8cecfa6ffc |
| name | Default-Scheduler |
| enabled | True |
| run_mode | RUN_MODE_PERIODIC |
| start_date_time | 2021-06-24T04:05:30.716351 |
| frequency | 1 |
| frequency_unit | SCHEDULER_FREQUENCY_UNIT_DAY |
| backup_config_ref | Backup-Configuration |
| scheduler_action | SCHEDULER_ACTION_BACKUP |
| tenant_ref | admin |
+-------------------+------------------------------------------------+
[admin:10-1-1-10]: > show backupconfiguration Backup-Configuration
+------------------------+----------------------------------------------------------+
| Field | Value |
+------------------------+----------------------------------------------------------+
| uuid | backupconfiguration-cf622e2c-0e05-4fb0-8065-972b4ffd3d45 |
| name | Backup-Configuration |
| save_local | True |
| maximum_backups_stored | 4 |
| backup_passphrase | <sensitive> |
| tenant_ref | admin |
+---------
■change backup configurations
> configure scheduler Default-Scheduler
< https://avinetworks.com/docs/latest/backup-and-restore-of-avi-vantage-configuration/>
■Backup file path
admin@10-1-1-10:/var/backups$ sudo find / -name backup_Default-Scheduler*
find: File system loop detected; ‘/host/root2’ is part of the same file system loop as ‘/’.
/var/lib/avi/backups/backup_Default-Scheduler_20211004_040538.json
/var/lib/avi/backups/backup_Default-Scheduler_20211022_040539.json
/var/lib/avi/backups/backup_Default-Scheduler_20210924_040534.json
/var/lib/avi/backups/backup_Default-Scheduler_20210907_040532.json
■Download backup file
You can download just click on "Local file".
(Local Fileの該当ファイルをクリックすればDLできる)
■Back up execution
Login and change to shell mode
[admin:10-1-1-10]: > export configuration file /tmp/aviBkup3node.json full_system
Please enter the passphrase to encrypt configuration:
Retype passphrase:
Downloaded the attachment to /tmp/aviBkup3node.json
Completed writing the export configuration to /tmp/aviBkup3node.json
The backup file does not show up in previous GUI page because file path was different from regular back up file path.
■Controller Cluster Restoration
・Upload backup file
scp /var/backup/avi_config.json admin@://tmp/avi_config.json
https://docs.vmware.com/jp/VMware-NSX-Advanced-Load-Balancer/20.1.4/Administration_Guide.pdf
- Deploy three new controllers and power on VM.
- Access via browser and set password @controllers.
- Login 3 Controllers and apply patch same as backup acquired version.
- SSH to the 2-follower Controllers.
execure "reboot clean" on shell mode.
https://avinetworks.com/docs/21.1/patch-upgrade-process-post-18.2.6-release/
https://avinetworks.com/docs/latest/backup-and-restore-of-avi-vantage-configuration/
Command sample.
sudo /opt/avi/scripts/restore_config.py --config /tmp/aviBkup3node.json --passphrase HogeHoge --vip 10.1.1.13 --followers 10.1.1.9 10.1.1.10 --flushdb
:
:
'CLUSTER_FOLLOWER', 'up_since': '2021-11-01 06:02:40'}, {'state': 'CLUSTER_ACTIVE', 'name': '10.1.1.8', 'mgmt_ip': '10.1.1.8', 'role': 'CLUSTER_LEADER', 'up_since': '2021-11-01 06:02:40'}, {'state': 'CLUSTER_ACTIVE', 'name': '10.1.1.9', 'mgmt_ip': '10.1.1.9', 'role': 'CLUSTER_FOLLOWER', 'up_since': '2021-11-01 06:02:40'}]
======== Configuration Restored for 3-node cluster ========
admin@10-1-1-8:/tmp$
You will able to restore Controller Cluster.
Thank you.