Managing Configurations and Backups — Network Management
Professional Blog / Network Management / Managing Configurations and Backups
CFG
Network Management Series Article 5 of 6 🕐 10 min read
💾

Managing Configurations and Backups

Automate network configuration backups and version control for consistency and disaster recovery

Published15 July 2025
Updated02 September 2025
AuthorJean Claude Munyakazi

In networking, being proactive about configuration backups is more than a best practice; it's a safeguard against unexpected failures, misconfigurations, and upgrade hiccups. A single misconfigured command or failed upgrade can bring down critical network services.

A robust backup strategy covers not just what to back up, but how frequently, where to store it, and how to verify and restore it. Configuration management without a tested restore process is not configuration management; it's false confidence.

⚠️
Real-World Scenario: The Cost of No Backup
3 AM network outage. Configuration corrupted during upgrade. No recent backup available. 4-hour restoration time rebuilding from memory and change logs. This is entirely preventable with automated daily backups.

IOS File System Commands

CommandPurposeExample
show file systemsList available file systemsShows flash, nvram, tftp, usb
dir flash:List directory contentsdir flash:/configs/
mkdir flash:/backups/Create directoryOrganize backup folders
copy run tftp:Backup running configMost common backup method
copy tftp: runRestore from TFTPRecovery from backup server
delete flash:/filenameDelete fileClean up old backups

Backup Methods

1. TFTP Backup (Most Common)

Cisco IOS — TFTP Backup and Restore
# Save running config to TFTP server
copy running-config tftp://192.168.1.100/router01-config-2025-07-15.txt

# Save startup config too
copy startup-config tftp://192.168.1.100/router01-startup-2025-07-15.txt

# Restore from TFTP
copy tftp://192.168.1.100/router01-config-2025-07-15.txt running-config

2. SCP / SFTP (Secure — Recommended)

Cisco IOS — SCP Backup
# Enable SCP server on the router (IOS 12.4+)
Router(config)# ip scp server enable

# Copy via SCP from external system
scp [email protected]:running-config ./backups/router01-2025-07-15.cfg

# Or push from router via SCP
copy running-config scp://[email protected]/backups/router01.cfg

3. USB Drive Backup

Cisco IOS — USB Backup
# Verify USB is available
Router# show file systems | include usb

# Back up to USB
Router# copy running-config usbflash0:/router01-backup-20250715.txt

# Restore from USB
Router# copy usbflash0:/router01-backup-20250715.txt running-config

Multi-Vendor Command Reference

FunctionCisco IOSJuniper JunOSFortinet
Show Configshow running-configshow configurationshow full-configuration
Save Configcopy run tftpsave configbackup config tftp
RollbackManual restorerollback 1restore config
Commit ConfirmNot built-incommit confirmed 5Not built-in
Juniper JunOS — Commit Confirmed (Auto-Rollback)
# Commit with 5-minute auto-rollback if not confirmed
user@router# commit confirmed 5

# Must confirm within 5 minutes or config rolls back automatically
user@router# commit  # Confirms and makes permanent

# Save configuration to file
user@router> save config backup-2025-07-15.conf

Automated Backup Solutions

Python with Netmiko

Python — Automated Backup Script
from netmiko import ConnectHandler
from datetime import datetime

devices = [
    {'device_type': 'cisco_ios', 'host': '192.168.1.1',
     'username': 'admin', 'password': 'password', 'hostname': 'router01'},
    {'device_type': 'cisco_ios', 'host': '192.168.1.2',
     'username': 'admin', 'password': 'password', 'hostname': 'switch01'},
]

for device in devices:
    conn = ConnectHandler(**device)
    config = conn.send_command('show running-config')
    date = datetime.now().strftime('%Y%m%d-%H%M')
    filename = f"backups/{device['hostname']}-{date}.cfg"
    with open(filename, 'w') as f:
        f.write(config)
    print(f"Backed up {device['hostname']} -> {filename}")
    conn.disconnect()
Commercial Backup Automation Tools
Oxidized — Open-source, Git integration, multi-vendor
RANCID — Legacy but proven, CVS/SVN integration
SolarWinds NCM — Change detection, compliance checking
ManageEngine NCM — Mid-size networks, change alerts
Ansible — Playbook-driven config management

File Naming Convention

Recommended Naming Standard
# Format: DeviceName-YYYY-MM-DD-HHMM-Type.cfg
router01-2025-07-15-0200-daily.cfg
switch-core-2025-07-15-0200-daily.cfg
firewall01-2025-07-14-pre-change.cfg   # Before a change window
firewall01-2025-07-14-post-change.cfg  # After a change window

Best Practices

Key Recommendations
  • Automate daily backups; manual backups will be forgotten before the outage that needs them
  • Always backup before any change window, maintenance, or upgrade
  • Store backups off-device; a TFTP server or Git repository, not just flash
  • Test restores quarterly; an untested backup is not a backup
  • Use Oxidized or RANCID for automated multi-device backup with version history
  • Implement change detection alerts; know when a configuration changes unexpectedly
  • Keep 30 days of daily backups minimum; retain pre-change backups indefinitely
  • Use Juniper's commit confirmed or equivalent for safe configuration testing
4.5 2 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x