Multiple Cisco device configuration Backup using python Script
Multiple Cisco device configuration Backup using python Script Device configuration will be saved as per Hostname. Saved files are looking as below: =================== Python Script: =================== from netmiko import ConnectHandler import pandas as pd import datetime import os # Read device information from the Excel file device_file = "devices.xlsx" devices_df = pd.read_excel(device_file) # Convert the dataframe to a list of dictionaries devices = devices_df.to_dict( orient = 'records' ) # Directory to save the configuration files output_directory = "device_configs" os.makedirs(output_directory, exist_ok = True ) # Define the commands to be executed commands = [ 'show running-config' , 'show ip interface brief' , 'show version' ] # Get the current date current_date = datetime.datetime.now().strftime( "%Y-%m-%d" ) # Function to connect to a device and save the output to a file def connect_and_save (