Backup network configurations to Github using IBM RNA

 View Only
Tue December 10, 2024 07:48 PM

Introduction

In modern IT environments, managing network configurations efficiently and securely is crucial for network reliability, disaster recovery, and troubleshooting. Leveraging network automation tools like IBM Rapid Network Automation (RNA) allows organizations to automate the backup and management of network device configurations, ensuring consistency, security, and compliance across a variety of network devices.

One innovative way to manage and store these network configurations is by integrating RNA with GitHub—a popular platform for version control and collaboration. This blog post will walk you through how to backup network configurations from your network devices to GitHub using RNA, enabling you to take advantage of GitHub's versioning, collaboration, and backup capabilities. 

This great automation enables any organization to start backing up hundreds or thousands of network devices in one workflow that can be scheduled to run on a regular basis.

Why Backup Network Configurations?

Network device configurations are the backbone of your network infrastructure. If something goes wrong—be it accidental configuration changes, software bugs, or malicious attacks—it’s essential to have a reliable backup and version history of configurations for restoration or audit purposes. By backing up these configurations to a GitHub repository, you can:

  1. Ensure version control: GitHub’s versioning features allow you to track changes over time and revert to previous configurations if necessary.
  2. Increase collaboration: Teams can collaborate on configuration changes, review historical changes, and contribute to configuration updates in a centralized location.
  3. Enable disaster recovery: In case of a network failure, you can quickly retrieve and restore configurations to ensure minimal downtime.
  4. Improve compliance: Keeping a history of configuration backups is essential for maintaining security standards and passing compliance audits.

Workflow Description:

As you may find in my previous contributions, this workflow is using NAPALM to connect to network devices and facilitate the data collection. Once the running configuration is obtained, you need to convert to Base64 format, since it is a Github requirement to upload files; I want to highlight the fact that this process is something very easy to accomplish with RNA (drag and drop one block), compared with other scripting alternatives. Once this is done, the final step is to Create or Update the File into Github. A final detail, I have added a validation to see if the actual file exists or not, since it is not the same to create a new file or update it. 

My invitation is to test this automation and I am happy to receive your feedback, so I can expand, fix and increase the use case.

List of requirements:

  • RNA Version: 1.1.3 or later
  • Integrations required: 
    • NAPALM (already included on RNA)
      • Authentication(s) needed: network devices CLI (username/password)
    • GitHub (already included on RNA, drag and drop functions)
      • Authentication(s) needed: API token with access to the Repo.

Setup:

  • Workflow: Backup2_Github (attachment).
  • Create Authentication for NAPALM  (IP, port, username, password, enable)
  • To have a Github repo (on my case I am using SaaS Github) and enable one API token with write access to that Repo.
  • Recommended to test first on one network device.

Expected results:

RNA will collect the live configuration from the Network device and will upload to Github as backup with different versions in case the file already exists. The device's name will be the name of the backup file at the repository.


#TechnicalBlog
#ImplementationTips
#TrainingContent/Userguides
#BestPractices
#Documentation

Statistics
0 Favorited
7 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
zip file
Backup2_Github.zip   1 KB   1 version
Uploaded - Wed December 11, 2024