{"id":33144519,"url":"https://github.com/lykinsbd/stockpiler","last_synced_at":"2026-02-27T00:17:06.728Z","repository":{"id":57471573,"uuid":"232170135","full_name":"lykinsbd/stockpiler","owner":"lykinsbd","description":"Stockpile Your Network Device Configurations - A Python/Nornir Based Network Device Backup Tool","archived":false,"fork":false,"pushed_at":"2020-05-15T18:53:52.000Z","size":150,"stargazers_count":42,"open_issues_count":10,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-08-23T19:36:05.517Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lykinsbd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2020-01-06T19:27:54.000Z","updated_at":"2025-01-19T22:03:21.000Z","dependencies_parsed_at":"2022-09-26T17:40:28.710Z","dependency_job_id":null,"html_url":"https://github.com/lykinsbd/stockpiler","commit_stats":null,"previous_names":["rackerlabs/stockpiler"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/lykinsbd/stockpiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykinsbd%2Fstockpiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykinsbd%2Fstockpiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykinsbd%2Fstockpiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykinsbd%2Fstockpiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lykinsbd","download_url":"https://codeload.github.com/lykinsbd/stockpiler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykinsbd%2Fstockpiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29878460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"ssl_error","status_checked_at":"2026-02-26T23:50:46.793Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-11-15T13:00:29.831Z","updated_at":"2026-02-27T00:17:06.720Z","avatar_url":"https://github.com/lykinsbd.png","language":"Python","funding_links":[],"categories":["Network Change Management"],"sub_categories":["SD-WAN"],"readme":"# ![Stockpiler Logo](stockpiler_logo_200x200.png)\nStockpiler gathers network device configurations and stores them in a local Git repository.\n\nStockpiler utilizes Nornir, Netmiko, and GitPython for a fully self-contained\n backup solution, and has been tested to function on Linux, MacOS, and Windows.\n\n## Supported Platforms\n\nToday, Stockpiler can back up any Cisco IOS-like device that understands the `more system:running-config` command.\nThis includes devices running these operating systems:\n\n* Cicso IOS\n* Cisco IOS-XE\n* Cisco ASA OS\n* Cisco Nexus OS\n\nFurther device support can be easily added as needed by creating additional Nornir Tasks for them.\n\n## Using Stockpiler\n\nOnce installed in an environment Stockpiler can be called directly/ad-hoc, or more commonly, by a Cron Job or other \n system scheduling tool such as creating a Systemd service.\n\nThe most basic execution of Stockpiler would be simply executing the following:\n\n    stockpiler\n\nThis will read the credentials from the Inventory or the environment, then attempt a backup of devices in the Nornir\n Inventory at `/etc/stockpiler/inventory` and put the resultant backups into a Git repository in `/opt/stockpiler`.\n\nHowever, there are many configuration options available as well to specify Inventory location, provide custom credentials,\n utilize a SOCKS proxy, and so forth.\n\nAnother, more complex execution example could be:\n\n     stockpiler \\\n     --inventory /home/brett/mah_inventory \\\n     --output /home/brett/stockpiler_backups \\\n     --proxy localhost:8000 \\\n     --log_level DEBUG \\\n     --logging_dir /home/brett/stockpiler_logs \\\n     --prompt_for_credentials\n \nSee `stockpiler --help` for full command information.\n\n### Credentials\n\nBy default, Stockpiler will look in the following three Environment Variables for the username/password/enable_password to use:\n\n* `STOCKPILER_USER`\n* `STOCKPILER_PW`\n* `STOCKPILER_ENABLE`\n\nNote that if `STOCKPILER_ENABLE` is not set, Stockpiler will utilize the `STOCKPILER_PW` for both values.\n\nIn addition, if these values are not set, you must tell Stockpiler to either locate a file with credentials, to prompt\n you for credentials, or to use the credentials in the Nornir inventory.\n By default **it will not do so, as it is intended to be run in a non-interactive scenario**, i.e. by a Cron job,\n and will simply raise an OSError and exit.\n\nTo propmt for credentials, supply the command line argument `--credential_prompt`.\n\nTo provide a file with the credential values, supply the command line argument `--credential_file \u003cfile path\u003e`.\n This file must only be readable by the user executing Stockpiler, and must be Base 64 encoded with the original\n contents in the following format, otherwise Stockpiler will raise an OSError.\n\n    STOCKPILER_USER:USERNAME\n    STOCKPILER_PW:PASSWORD\n    STOCKPILER_ENABLE:PASSWORD\n\nTo utilize the Nornir Inventory credentials, supply the command line argument `--credential_from_inventory`.\n\n### Configuration\n\nAs Stockpiler utilizes Nornir for the underlying inventory and task handling, see the \n [Nornir documentation](https://nornir.readthedocs.io/en/latest/tutorials/intro/inventory.html) for more information\n on creating an inventory file or your configuration options\n\nWhile we have provided a simple `nornir_conf.yaml` file, you are welcome to provide your own or customize\n the one provided by the package.\nSee the [Nornir documentation on Configuration](https://nornir.readthedocs.io/en/latest/configuration/index.html)\n for more information on the options available to you.\n\nIf you are using Windows (or wish to host your inventory in a different location than `/etc/stockpiler/inventory`), you\n will need to create a custom Nornir config file with your inventory paths.\n\n\n## Installation\n\nNotes:\n\n1. Stockpiler **requires Python 3.7 or higher**.\n2. Stockpiler utilizes Python Virtual Environments for isolation of the code/environment.\n3. Stockpiler utilizes a very recent release of Netmiko. This requires some specific handling (as outlined below),\n   until Napalm updates their dependencies in napalm\u003e=3.0.0.\n\n### Installation Steps\n\n1. Create a directory for the Stockpiler virtual environment:\n    `mkdir stockpiler`\n2. Create a virtual environment in that directory:\n    `python3 -m venv stockpiler`\n3. Navigate to the new directory and activate it:\n    `cd stockpiler;source bin/activate`\n4. Install Stockpiler:\n    `pip install stockpiler`\n5. Edit the dependencies, this will require you to find the Napalm and Nornir `METADATA` files in your virtual\n environment:\n    * Paths should be similar to:\n        * `lib/python3.7/site-packages/napalm-2.5.0.dist-info/METADATA`\n    * In each file, find the lines similar to below that reference Netmiko:\n        * `Requires-Dist: netmiko (==2.4.2)`\n    * Edit it to include 3.0.0, similar to the below:\n        * `Requires-Dist: netmiko (\u003e=2.4.2)`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flykinsbd%2Fstockpiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flykinsbd%2Fstockpiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flykinsbd%2Fstockpiler/lists"}