-
Book Overview & Buying
-
Table Of Contents
Python Network Programming Techniques
By :
With our vendor-agnostic functions, we can also carry out common backup tasks with ease. For instance, let's assume, before a big change, you want to back up all the configurations on your devices. NAPALM offers a very convenient way of retrieving not only the running configuration but also the starting and candidate configurations of your devices. In this recipe, we are going to explore how to use this ability to easily retrieve full configurations from a device to create backups.
Open your code editor and create a file called backup_config.py. Next, in your Terminal, navigate to the same directory that you just created the backup_config.py file in.
The following steps demonstrate how to connect to a device, read the different types of configurations, and then write them to a file:
napalm module:import napalm
napalm module, retrieve the appropriate...