Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Restore Apstra Database

CAUTION:

Always restore a database from a new backup, never from older backups or from the backup included in a show_tech.

When you restore a database, the worker VMs will go into a failed state. This problem also occurs when you restore a backup to another worker VM with the same IP address. To fix this issue, add the worker VMs again.

If you make changes after you back up the database, those changes aren't included in the restore. This could create differences between device configs and the Apstra environment. If this happens, you must perform a full config push, which is service-impacting.

Don't restore a database using the backup included in a show_tech. Juniper Support and Engineering use it for analysis. It doesn't include credentials, so it's not suitable for restoring your production environment.

Note:

If you're restoring a backup to a new Apstra server that uses a different network interface for access (eth1 vs eth0 for example), you must update the metadb variable in the [controller] section of the /etc/aos/aos.conf configuration file, then restart the Apstra server.

  1. Backups are saved in dated snapshot directories. Verify that you have a fresh backup in the /var/lib/aos/snapshots/ directory.
  2. The file name must be aos.data.tar.gz. Verify the file name, and correct it, if needed.
  3. Run the aos_restore command as illustrated below. The restore process first backs up the current database.
  4. When the database has been restored and migrated to a new server, the entire system state has been copied from the backed up installation to the new target. Run the command service aos status to validate the restoration.
  5. The database is stored on the Apstra server itself. If the server needs to be restored or if its disk image becomes corrupt, any backups/restores are lost along with the Apstra server. We recommend that you periodically move backups/restores off of the Apstra server to a secure location. Also, if you've scheduled cron jobs to periodically backup the database, make sure to rotate those files off of the Apstra server to keep the Apstra server VM disk from becoming full. Copy the contents of the snapshot directory to your backup infrastructure.