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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file nornir_network_backup-0.1.1.tar.gz.

File metadata

  • Download URL: nornir_network_backup-0.1.1.tar.gz
  • Upload date:
  • Size: 27.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.9.16 Linux/4.15.0-200-generic

File hashes

Hashes for nornir_network_backup-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e88fc31085c1df78749e7a5b8d10e5531f01977af33c07e5cadd7e189c8789aa
MD5 c4bcf4182b06b77f77c314ab81911f26
BLAKE2b-256 6d6dbfe29d553c906806b767c1cf58c71450df4a17bd6f7892013173dd094a86

See more details on using hashes here.

File details

Details for the file nornir_network_backup-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nornir_network_backup-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 62029a62cd8f9c085e71ddf6f936caa4925bcf46c9a916d4d3afcedf9b8c1aa7
MD5 a8db114b6f75b0bf8f4dd4dead49aa53
BLAKE2b-256 476af4d2af9b20ba9b524b765a60c1f6920a9caae430253944e9d06d6953c8af

See more details on using hashes here.

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