Skip to main content

No project description provided

Project description

nornir-network-backup

A nornir playbook to store network equipment config backups and relevant "show" command facts.

You can define the main configuration backup command or fact commands per device type.

This backup tool uses Netmiko for connecting to devices and Textfsm to parse facts.

Requirements:

  • nornir
  • nornir-utils
  • nornir-netmiko

This is a beta version. Extra options and documentation will follow soon !

Function

  • take the running config of 1 or more hosts and save it to a file
    • the file will be overwritten every day
    • optional take a diff of the previous file and save it as well
  • run "show" commands and save each output to a separate file in a facts folder
    • files will be overwritten every time
    • all files in a single facts folder
    • save a file with meta data: info about the last backup time, commands executed, failed + successful commands
    • the commands may change depending on vendor or hw type or software
    • commands which can be parsed with textfsm will be saved as YAML, if they cannot be parsed then it will be .config text files
  • it should be possible to run the backup file for a single host
  • or run agains a complete file
  • generate an overall report with:
    • last run time
    • hosts succeeded
    • hosts failed
    • hosts skipped

Output folder structure

|- backup folder
|  |-- facts folder
|  |-- reports folder  

Commands

nnb backup
nnb backup-single-host

Usage

poetry run nnb backup-single-host

Environment Variables

Used by nornir_utils.plugins.inventory.load_credentials transform function, in case username + password are not defined by CLI

NORNIR_USERNAME

NORNIR_PASSWORD

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nornir_network_backup-0.1.1.tar.gz (27.6 kB view hashes)

Uploaded Source

Built Distribution

nornir_network_backup-0.1.1-py3-none-any.whl (18.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page