Package: netcfgbu
Network Configuration BackupAs a network engineer I need to backup my network configuration files into a
version control system, and I need a tool to automate this process.  My primary
means of accessing the devices is SSH.Supported DevicesThenetcfgbutool was built specifically to backup network operating system (NOS)
configurations that are monolithic in nature.  That is to say the entire
configuration can be captured using a command such as "show running-config".  Any
NOS that provides a monolithic configuration should be supported bynetcfgbu.Primary ConsiderationsI have a multi-vendor environment. I need to account for the different commands
that are used to obtain the running configuration and disable paging if
required.I want to provide my network inventory in a simple CSV format.  I want to
create this inventory dynamically from one or more sources, for example Netbox.
I want the ability to filter this inventory with limit and exclude constraints.I may need to try multiple SSH credentials.  I must not store my passwords in
any configuration file, so this tool must acquire passwords via environment
variables.I will have a large number of devices (>1000) so I want this tool to take
advantage of any and all techniques that reduce the total amount of time.The general approach tonetcfgbuis a configuration based methodology so as
to not hardcode the tool to work with specific network device drivers
and avoid the complexity and dependency of including a collection of 3rd-party
libraries specific to network devices.Read the Documenttionhere.Read the Quick StarthereExample netcfgbu.toml configurationIntroductionOnce you've setup theconfigurationfile andinventoryfile you can backup all of your configurations
using the command:$netcfgbubackupAt the end of the run, you will see a report, for example:# ------------------------------------------------------------------------------Summary:TOTAL=1482,OK=1482,FAIL=0START=2020-Jun-0501:48:55PM,STOP=2020-Jun-0501:50:08PMDURATION=72.566s# ------------------------------------------------------------------------------There are a number of othercommandsprovided as shown via--help:Usage: netcfgbu [OPTIONS] COMMAND [ARGS]...

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  backup     Backup network configurations.
  inventory  Inventory subcommands.
  login      Verify SSH login to devices.
  probe      Probe device for SSH reachablility.
  vcs        Version Control System subcommands.SetupThenetcfgbutool does not require you to create a configuration file, but
for practical purposes you will generally need one.  The file isTOMLformat.  The default file isnetcfgbu.tomlandnetcfgbusearches for in the current working directory.
You can override this location using the-C <filepath>option or using the
environment variableNETCFGBU_CONFIGAt a minimum you need to designate theinventoryCSV file and
a default set of SSH login credentials.  The network device configs will be
stored in the current working directory, or as specified in thedefaults.configs_diroption.  The configuration-file supports the use of environment variables.Example:[defaults]inventory="$PROJ_DIR/inventory.csv"configs_dir="$PROJ_DIR/configs"credentials.username="$NETWORK_USERNAME"credentials.password="$NETWORK_PASSWORD"Thenetcfgbudefines the use of specificEnvironment Variables.  Their
use is the equivalent of the following configuration file.  That is to say, if you did not providenetcfgbua
configuration file, this would be used:[defaults]inventory="$NETCFBU_INVENTORY"configs_dir="$NETCFGBU_CONFIGSDIR"credentials.username="$NETCFGBU_DEFAULT_USERNAME"credentials.password="$NETCFGBU_DEFAULT_PASSWORD"System Requirements and InstallationThis tool requires the use of Python3.8.Installation available via PyPI:$pipinstallnetcfgbuQuestions or Suggestions?Please open a github issue if you have any questions or suggestions.Thank you!