EdgeRouter - Backup and Restore Configuration


Overview


Readers will learn how to backup and restore the configuration file of an EdgeRouter. It is also possible to use this method to apply the same configuration to multiple EdgeRouters. Care should be taken when uploading a configuration to a different model than the backup was created as it can cause conflicts with the available features, port counts, and switch interfaces.

NOTES & REQUIREMENTS:
Applicable to the latest EdgeOS firmware on all EdgeRouter models. Please see the Related Articles below for more information and see the attachments for the configuration used in this article.
 
Devices used in this article:

Table of Contents


  1. EdgeRouter Configuration File
  2. Backup and Restore using the GUI
  3. Backup and Restore using the CLI
  4. Related Articles

EdgeRouter Configuration File


Back to Top

The EdgeRouter platform stores all the configured changes in the boot/startup configuration file. This file is called config.boot and is loaded when the EdgeRouter (re)boots. The config.boot file can either be downloaded from the GUI (contained in the backup archive) or copied directly from the Command Line Interface (CLI). Both methods are demonstrated below.


Backup and Restore using the GUI


Back to Top

GUI: Access the Graphical User Interface (GUI).

 

If you wish to backup the EdgeRouter configuration archive, follow the steps below:

backup_and_restore_download_topology_new.png

1. Navigate to the System tab in the bottom-left of the GUI to download the backup configuration archive.

System > Configuration Management & Device Maintenance > Back Up Config

2. Download the backup config file by clicking on the button.

image.png

3. The EdgeRouter will prompt you to save the archive on your computer.

NOTE: The EdgeRouter startup configuration file (config.boot) is included in an archive called edgeos_ubnt_yyyymmdd.tar.gz.

4. Open the edgeos_ubnt_yyyymmdd.tar.gz archive using a using a file archival program such as 7-Zip.

image.png

5. Verify the contents of the startup/boot configuration by opening the config.boot file using a text editor.

firewall {
all-ping enable
broadcast-ping disable
ipv6-src-route disable
ip-src-route disable
log-martians disable
<...output shortened...>

If you wish to restore the device using the configuration archive, follow the steps below: 

backup_and_restore_upload_topology_new.png

1. Navigate to the System tab in the bottom-left of the GUI to upload a previously downloaded archive.

System > Configuration Management & Device Maintenance > Back Up Config

2. Upload the backup config archive by clicking on the  button.

3. Browse your computer for the backup configuration archive.

4. Wait for the file to be uploaded. When the upload is complete, the archive name will be shown in the GUI.

5. The EdgeRouter will prompt for a device reboot to complete the restore.

6. Reboot the device to load the new startup/boot configuration.


Backup and Restore using the CLI


Back to Top

The EdgeRouter uses three configuration sets:

  • Boot/Startup Config: When the EdgeRouter reboots, it loads the boot/startup configuration (config.boot)
  • Active Config: Currently active configuration with changes that have not been saved to the boot/startup configuration yet.
  • Working Config: Non-active configuration with changes that have not been applied (committed) yet.
CLI: Access the command line interface (CLI). You can do this using the CLI button in the GUI or by using a program such as PuTTY.

If you wish to backup the EdgeRouter boot/startup configuration file, follow the steps below:

1. Enter configuration mode.

configure

2. Make sure that all changes in the currently active/working configurations are saved to the boot/startup config.

commit ; save

3. Verify the contents of the config.boot file.

cat /config/config.boot

4. Save the configuration to a remote machine using either TFTP, SCP, FTP or SFTP.

save ?
Possible completions:   scp://<user>:<passwd>@<host>/<file>   Save to file on remote machine
  sftp://<user>:<passwd>@<host>/<file>  Save to file on remote machine
ftp://<user>:<passwd>@<host>/<file> Save to file on remote machine
  tftp://<host>/<file>                  Save to file on remote machine

save tftp://192.168.1.10/config.boot

Warning: saving configuration to non-default location 'tftp://192.168.1.10/config.boot'...
######################################################################## 100.0%
Done

5. Verify the contents of the startup configuration by opening the config.boot file using a text editor.

firewall {
all-ping enable
broadcast-ping disable
ipv6-src-route disable
ip-src-route disable
log-martians disable
<...output shortened...>
 

If you wish to restore the device using the boot/startup configuration file, follow the steps below:

1. Enter configuration mode.

configure

2. Load the backup configuration from a local or a remote file.

load ?

Possible completions:
  <Enter>                               Load from system config file
  <file>                                Load from file on local machine
  scp://<user>:<passwd>@<host>/<file>   Load from file on remote machine
  sftp://<user>:<passwd>@<host>/<file>  Load from file on remote machine
ftp://<user>:<passwd>@<host>/<file> Load from file on remote machine
http://<host>/<file> Load from file on remote machine
tftp://<host>/<file> Load from file on remote machine

load tftp://192.168.1.10/config.boot
######################################################################## 100.0%
Loading configuration from '/config/config.boot.2380'...

Load complete. Use 'commit' to make changes active.

3. Compare the differences between the backup/working configuration and the active configuration.

compare

4. Commit the changes

commit

5. Save the active configuration to the startup/boot configuration.

save

Saving configuration to '/config/config.boot'...

Related Articles


Back to Top

Intro to Networking - How to Establish a Connection Using SSH

EdgeSwitch - Backup and Restore Configuration


We're sorry to hear that!