NetPicker - A Great Network Configuration Backup Tool

Hi everyone, welcome back to the Packetswitch blog. Today, we're going to look into NetPicker, a tool that not only performs Network Compliance Tests but also takes backups of your network devices. In this post, we'll walk you through downloading and installing NetPicker, adding devices, taking backups, and setting up backup schedules.

Is It Free?

As of September 2024, according to NetPicker’s pricing page, there’s a ‘Free for Life’ plan that allows unlimited backup of your device configurations and unlimited automated tests for up to 10 devices. This means you can manage backups for all of your devices without spending a penny. If you need to run tests on more than 10 devices, you’ll likely need to consider purchasing a license.

💡
Disclaimer - NetPicker sponsors my blog as of writing this post. However, the opinions expressed here are entirely my own, and they have not influenced the content of this article.

Download and Installation

To get started with NetPicker, navigate to their website and fill out the form with your name and email. After you complete this step, you'll receive an email with detailed installation instructions. You have two main options for installation.

  1. Download an OVA Image - This method involves downloading a Linux virtual machine image that runs NetPicker within a Docker container.
  2. Run Docker Containers on Your Own Machine - If you prefer to use your existing infrastructure, you can install NetPicker directly on your machine using Docker. This is the route I chose, installing NetPicker on my Ubuntu server.

To install it, simply SSH it into your Ubuntu server, clone the NetPicker repository (you'll find the details in your email), and execute the bash up.sh command. This process assumes you already have Docker installed on your server.

This command internally executes docker-compose pull and docker-compose up commands. Docker Compose is a tool for defining and running multi-container Docker applications. With it, you use a YAML file to configure your application’s services, networks, and volumes, and then with a single command, you create and start all the services from your configuration.

NetPicker Initial Setup

Once the installation completes, navigate to http://<SERVER_IP>. Here, log in with the default credentials you received in your email.

Before adding your devices, you’ll need to create a ‘Vault’ to securely store the credentials. Navigate to ‘Devices’ then ‘Vault’, and click on ‘Add Vault’.

Next, you’ll add your actual network devices. Navigate to ‘Devices’ then ‘Add Devices’. You will need to specify the device type and select the vault where its credentials are stored. Optionally, you can also add tags.

In this example, I added two Arista devices and one Cisco device.

Backing Up Devices

Taking backups is as simple as selecting the device and clicking on 'Run backups'

Wait for a few seconds for the backup to complete. To view the backups, navigate to Backups and select the device.

Config Diffs

If you need to compare differences between two backups, simply select the two backups you want to compare and click ‘Compare’.

Remember, the order in which you select the backups matters. If you have added new configurations since the last backup, make sure to select the older backup first and then the newer one. This way, the diff will indicate that something was ‘added’.

If you select the newer backup first, the diff will say that configurations were ‘removed’.

Backup Schedules

To create a backup schedule, go to ‘Devices’ then ‘Schedule’, and click on ‘Add schedule’. In this section, you can define the frequency and timing of the backups.

In my example, I have two schedules running. The ‘# Runs’ column shows how many times each schedule has been executed.

Stopping and Starting NetPicker

To stop NetPicker, you can run the down.sh script, which executes the docker compose down command. This command stops and removes the containers, networks, and the default network, but it preserves your configuration and data volumes. If you want to restart NetPicker, simply run the up.sh script again.

If you need to start fresh and do not mind losing the existing data, you can use the command docker compose down -v. This variation of the down command also removes the volumes associated with your containers, effectively resetting everything to a clean state.

A Few Things to Consider

While setting up and using NetPicker has been largely straightforward, there are a couple of points you might want to keep in mind. First, I noticed that while the backup times show in my local time, the schedules themselves use UTC. This results in a time difference that could be confusing. I’ve spoken to NetPicker support about this issue, and they are currently working on a fix to align the times and reduce any confusion.

Additionally, I had some issues when trying to back up a Palo Alto firewall; the backup process didn’t work as expected. I will also reach out to the support team as well. If there are any updates or fixes from NetPicker, I’ll be sure to update this post to keep you informed.