Back up Apstra Database
You can back up the database while the Apstra server is
running. Device/OS image information is not included in backups. When restoring a
database, any device/OS image information is discarded.
Before backing up your database, disable any active IBA
probes and wait until any database "write" tasks have completed.
-
Run the command
aos_backup
to back up the database. Backups are saved as dated snapshots (/var/lib/aos/snapshot/<date>/aos.data.tar.gz
) in the Apstra server.If all IBA probes have been disabled and all "write" tasks have completed, the following message appears.
admin@aos-server:~$ sudo aos_backup ==================================================================== Backup operation completed successfully. ==================================================================== New AOS snapshot: 2023-06-29_20-56-26 admin@aos-server:~$
If many IBA probes are enabled or if any other DB "write" tasks are in progress, they may not be included in the backup, and the following message appears.
admin@aos-server:~$ sudo aos_backup Including secret keys from the backup Include all sysdb files ===================================================================== Warning: Backup operation has been completed successfully. However AOS state has been changed while this script was running, which means some changes might not have been captured in the snapshot created in this backup. You may choose to invoke aos_backup script again if you wish to capture these changes right now instead of waiting for the next backup operation. ===================================================================== New AOS snapshot: 2023-06-29_16-15-57 admin@aos-server:~$
If this message appears, disable your IBA probes and run the
aos_backup
command again. -
Backups are 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.
admin@aos-server:~$ sudo ls -lah /var/lib/aos/snapshot/ total 20K drwx------ 5 root root 4.0K Jun 29 20:58 . drwxr-xr-x 7 root root 4.0K Jun 29 02:43 .. drwx------ 2 root root 4.0K Jun 29 02:43 2023-06-29_02-43-12 drwx------ 2 root root 4.0K Jun 29 20:56 2023-06-29_20-56-26 drwx------ 2 root root 4.0K Jun 29 20:58 2023-06-29_20-58-54 admin@aos-server:~$