
= Device Configuration Backup
:description: Back up configuration for devices like routers, firewalls, switches with {page-component-title}, for better disaster recovery and change management.

OpenNMS lets you back up the configuration of devices like routers, firewalls, and switches.
This allows for a better disaster recovery framework in the case of network failure.

Through the UI, users can:

* Back up network device configuration on demand at any time for a single device or group of devices.
* Create a user-defined schedule to automate configuration backups.
* Trigger backups to occur when a device’s configuration changes, to ensure you always have a copy of the active device configuration.
* View backup history, download configurations, search, and compare configurations for specific devices at different points in time.
* Monitor device configurations for expected or unexpected changes

Only users with the xref:operation:deep-dive/user-management/security-roles.adoc#ga-role-user-management-roles[ROLE_DEVICE_CONFIG_BACKUP role] can perform and monitor device configuration backups.

IMPORTANT: The devices whose configuration you want to back up must either be TFTP-enabled or support an SSH shell.

== Before you begin

You must configure OpenNMS to perform configuration backups before you can xref:operation:deep-dive/device-config-backup/dcb.adoc#dcb-manage[view and manage] them in the {page-component-title} UI:

* xref:operation:deep-dive/device-config-backup/ssh.adoc#backup-script[Create a backup script for each device type]
* xref:operation:deep-dive/device-config-backup/configuration.adoc#tftp-port-configure[Configure TFTP port]
* xref:operation:deep-dive/device-config-backup/dcb-requisition.adoc#dcb-requisition[Create a requisition] and specify its metadata

== How it works

OpenNMS retrieves database configuration backups through a TFTP server embedded in the OpenNMS and Minion services.
Devices send their configuration to that TFTP server with either a pull- or push-based backup.

* Pull-based backup: OpenNMS uses its poller infrastructure to schedule tasks that connect via SSH into devices and execute configurable scripts that do the TFTP uploads.
* Push-based backup: Devices may upload their configuration themselves.
This may happen either by administrator interaction or scheduled jobs running on the devices themselves.

{page-component-title} stores device configuration backups for IP addresses in the default location or at remote locations in the {page-component-title} database.
It keeps configuration history to provide change tracking and compare differences between different versions of device configurations.
If {page-component-title} fails to retrieve configurations, it raises corresponding alarms to alert system operators.

