Help Center Help Articles Community RMA & Warranty Downloads Tech Specs

EdgeRouter - Backing Up the Config Directory

Translated by AI

Overview

Readers will learn how to backup the config directory on an EdgeRouter. This directory is often used as persistent storage for various files.

NOTES & REQUIREMENTS:
  • Applicable to the latest EdgeOS firmware on all EdgeRouter models.
  • More information on the Ubiquiti Network Management System can be found on the UNMS website.

Table of Contents

  1. The EdgeOS Config Directory
  2. Backup using UNMS
  3. Backup using the Web UI
  4. Backup using the Command Line
  5. Related Articles

The EdgeOS Config Directory

Back to Top

The EdgeRouter config directory is located at /config and is used to store various system files such as:

Files stored in the config directory persist between reboots and firmware upgrades. The directory is only cleared when the device is reset to factory defaults. The contents of the config directory can either be downloaded through UNMS, the local Web UI (contained in the configuration backup archive) or transferred/copied from the Command Line. Each method is demonstrated below.

Backup using UNMS

Back to Top

topology.png

Extracting the config directory from the EdgeRouter.

GUI: Access the UNMS Controller Web Portal.

1. Navigate to the Devices  devices.png  and select the EdgeRouter.

2. Navigate to the Backups  backup.png  section.

3. Manually create a new backup or select one of automatically created backup files.

NOTE:UNMS will automatically create backups for devices by default.

4. Download the backup archive and select the For This Device option.

5. Open the backup file using archival program such as 7-Zip and navigate to the config directory.

  • VPN RSA keys are stored in /config/ipsec.d/rsa-keys/
  • OpenVPN certificates and key files are stored in /config/auth/
  • Scripts are stored in /config/scripts/
  • Commit revisions are stored in /config/archive/
  • The boot/startup configuration (config.boot) is stored in /config/

Backup using the Web UI

Back to Top

GUI: Access the EdgeRouter Web UI.

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

System > Configuration Management & Device Maintenance > Back Up Config

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

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

4. Open the backup file using archival program such as 7-Zip and navigate to the config directory.

  • VPN RSA keys are stored in /config/ipsec.d/rsa-keys/
  • OpenVPN certificates and key files are stored in /config/auth/
  • Scripts are stored in /config/scripts/
  • Commit revisions are stored in /config/archive/
  • The boot/startup configuration (config.boot) is stored in /config/

Backup using the Command Line

Back to Top

Backing up the config directory using the command line requires some additional steps because some of the files are owned by the root user. In this example, the files in the /config directory are manually added to an archive that is later transferred using SCP.

CLI: Access the Command Line Interface.You can do this using the CLI button in the GUI or by using a program such as PuTTY.

1. Access the root user shell and add the files in the /config directory to an archive.

sudo tar -czvf /tmp/backupconfig.tar.gz /config

2. On the workstation, run the following command to transfer the archive using SCP.

scp ubnt@192.168.1.1:/tmp/backupconfig.tar.gz ./
NOTE:Windows users can either use the Windows Subsystem for Linux (WSL) or WinSCP is used to transfer the files using SCP.

3. Open the backup file using archival program such as 7-Zip and navigate to the config directory.

  • VPN RSA keys are stored in /config/ipsec.d/rsa-keys/
  • OpenVPN certificates and key files are stored in /config/auth/
  • Scripts are stored in /config/scripts/
  • Commit revisions are stored in /config/archive/
  • The boot/startup configuration (config.boot) is stored in /config/

Related Articles

Back to Top

EdgeRouter - Root User Account

Was this article helpful?
0 out of 0 found this helpful