Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

external-header-nav
keyboard_arrow_up
close
keyboard_arrow_left
Juniper Apstra 4.2 User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
keyboard_arrow_right

Back up Apstra Database

date_range 07-Feb-24
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.
  1. 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.

    content_copy zoom_out_map
    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.

    content_copy zoom_out_map
    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.

  2. 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.
    content_copy zoom_out_map
    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:~$
external-footer-nav
Ask AI
close

How can I help you today?

LLMs can make mistakes. Verify important information.
chat_add_on New topic
send progress_activity
This conversation will be monitored and recorded. Any information you provide will be subject to our Privacy Notice and may be used for quality assurance purposes. Do not include any personal or sensitive information. Ask AI can make mistakes. Verify generated output for accuracy.
Protected by hCaptcha arrow_drop_down arrow_drop_up
Juniper Networks, Inc. | Privacy Notice | Terms of Use