Skip to main content

A NetBox Switch Configuration Backup Plugin

Project description

Netbox Configuration Backup

A configuration backup system using netbox and napalm to backup devices into a git repository

Features

  • Connects to any device that supports napalm and provides both a running configuration and startup configuration
  • Stores backups in a git repository
  • Runs as a scheduled task through Django RQ
  • Only displays backups with changes
  • Provides both configuration download and diffs for point-in-time backups

Future

  • Allow github repositories
  • Add job "discovery" based on specific criteria (napalm enabled, device role switch, has primary ip as an example)
  • Add RQ job to ensure all backups are queued
  • Allow manual queueing of job
  • Add API endpoint to trigger backup
  • Add signal(s) to trigger backup

Installation

  1. Install from PyPI (pip install netbox-config-backup)
    1. This should install netbox_napalm_plugin which is also required
  2. Edit netbox configuration:
PLUGINS = [
    'netbox_config_backup',
    # Other plugins here
]

PLUGINS_CONFIG = {
    'netbox_config_backup': {
        # Parent folder must exist and be writable by your RQ worker and readable by the WSGI process
        'repository': '/path/to/git/repository',
        'committer': 'User <email>',
        'author': 'User <email>',
        # Freqency of backups in seconds, can be anywhere 0+ (Recommended is 1800 (30 minutes) or 3600 (1 hr)
        'frequency': 3600
    }
}
  1. Migrate: python3 netbox/manage.py migrate
  2. Create appropriate Napalm configurations for all devices you will be backing up
  3. Create your first device backup

Cleanup Old Version

If you are coming from an older version, please remove the custom RQ worker as it is no longer required

Logging

To enable logging, add the following to your configuration.py under LOGGING:

        'netbox_config_backup': {
            'handlers': ['enter_your_handlers_here'],
            'level': 'desired_log_level',
            'propagate': True,
        },

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

netbox_config_backup-2.2.2.tar.gz (41.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netbox_config_backup-2.2.2-py3-none-any.whl (67.0 kB view details)

Uploaded Python 3

File details

Details for the file netbox_config_backup-2.2.2.tar.gz.

File metadata

  • Download URL: netbox_config_backup-2.2.2.tar.gz
  • Upload date:
  • Size: 41.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for netbox_config_backup-2.2.2.tar.gz
Algorithm Hash digest
SHA256 038f7d4cd229e339663012d16b237516b01e181a3dfd249414830ce7c3bcfb47
MD5 9b3a06db1d5f7a148812911af76f017d
BLAKE2b-256 967ad26e73af50b5e6edc7fbc7eaec35b8a5203580096d2698e9c41c062a320c

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_config_backup-2.2.2.tar.gz:

Publisher: pypi.yml on DanSheps/netbox-config-backup

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file netbox_config_backup-2.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for netbox_config_backup-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b988a5e46cca3bc5e4a99c089f170115d22d205d7bd1e76f01fc9519fc9e5ec0
MD5 3358c1fcfc54be58d8a47f2fc3f42a23
BLAKE2b-256 7e790fd6907db00bc2d3f6d98f21749ebb86495817fec1f875ab2f3c37f5f23d

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_config_backup-2.2.2-py3-none-any.whl:

Publisher: pypi.yml on DanSheps/netbox-config-backup

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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