Connecting the world…

Auto Backup Configurations

Till recently I didn’t have a decent way to backup configurations from routers and switches without using some kind of management tool, like Cacti or Nagios. I wanted to automatically backup configurations by only using a TFTP or FTP server on a network.

I started looking and found the solution by using the archive and kron configurations. I decided to look for methods to backup configurations when one of the following occurrences happen:

  1. Somebody enters the save running-config to startup-config command (write memory);
  2. A certain time of day threshold is reached;

The following example configuration shows both occurrences.

archive
path tftp://192.168.1.100/C2960-01/$h
write-memory

!

kron occurrence SCHEDULE-TO-BACKUP-CONFIG at 20:00 recurring
policy-list BACKUP-CONFIG
!
kron policy-list BACKUP-CONFIG
cli write memory

The configuration above copies the configuration to TFTP server 192.168.1.100 at 20:00h every day. The configuration is also copied to the TFTP server after issuing a write memory. The syntax of the file name on the TFTP server is hostname-seq.number (e.q. SWITCH01-1, the following file would be SWITCH01-2).

I used it several times now and it works great. I use Tftpd32 as TFTP server on Windows, because it is freeware and can be configured as service.

The following two tabs change content below.

René Jorissen

Co-owner and Solution Specialist at 4IP Solutions
René Jorissen works as Solution Specialist for 4IP in the Netherlands. Network Infrastructures are the primary focus. René works with equipment of multiple vendors, like Cisco, Aruba Networks, FortiNet, HP Networking, Juniper Networks, RSA SecurID, AeroHive, Microsoft and many more. René is Aruba Certified Edge Expert (ACEX #26), Aruba Certified Mobility Expert (ACMX #438), Aruba Certified ClearPass Expert (ACCX #725), Aruba Certified Design Expert (ACDX #760), CCNP R&S, FCNSP and Certified Ethical Hacker (CEF) certified. You can follow René on Twitter and LinkedIn.

Latest posts by René Jorissen (see all)

2 Responses to Auto Backup Configurations

  • thankz Works like a charm.
    Is there any simalar for HP / Aruba Switches?

  • I am not sure if there is something similar in AOS / AOS-CX. CX has the concept of checkpoint, but I use the features of AirWave, Aruba Central or NetEdit for config management.

    You can search the internet for scripts in Python, Ansible or PowerShell for automatic backups.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.