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
Metadata
Release files for nornir-network-backup 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nornir_network_backup-0.1.1.tar.gz | 27.6 kB | Without provenance | Details for nornir_network_backup-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nornir_network_backup-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for nornir_network_backup-0.1.1-py3-none-any.whl |
Total release size: 45.6 kB
Release files / nornir_network_backup-0.1.1.tar.gz
| Download URL | nornir_network_backup-0.1.1.tar.gz |
|---|---|
| Size | 27.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e88fc31085c1df78749e7a5b8d10e5531f01977af33c07e5cadd7e189c8789aa
|
|
BLAKE2b-256 checksum How to use checksums |
6d6dbfe29d553c906806b767c1cf58c71450df4a17bd6f7892013173dd094a86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.9.16 Linux/4.15.0-200-generic
|
Release files / nornir_network_backup-0.1.1-py3-none-any.whl
| Download URL | nornir_network_backup-0.1.1-py3-none-any.whl |
|---|---|
| Size | 18.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62029a62cd8f9c085e71ddf6f936caa4925bcf46c9a916d4d3afcedf9b8c1aa7
|
|
BLAKE2b-256 checksum How to use checksums |
476af4d2af9b20ba9b524b765a60c1f6920a9caae430253944e9d06d6953c8af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.9.16 Linux/4.15.0-200-generic
|
Security for nornir-network-backup 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.