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)
  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 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.1.8.tar.gz (38.0 kB view details)

Uploaded Source

Built Distribution

netbox_config_backup-2.1.8-py3-none-any.whl (59.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for netbox_config_backup-2.1.8.tar.gz
Algorithm Hash digest
SHA256 ce9bf83005c1397fe51df428a2586509a9dda7138080a14295313054b9fb2496
MD5 1f21a0e06550c35f399e303c4e0c4ec2
BLAKE2b-256 7aa2cc77046fc29d8dba9f8464d22c43df9c45491740f13995b4bcf76e7712c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_config_backup-2.1.8.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.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for netbox_config_backup-2.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 e0aababeac265625f9e6feb8f905eb6067640357656a51cfb5da029859caa90c
MD5 c3f2629a4b7d9fbf6dbaf095c3d20294
BLAKE2b-256 eb06f9a536b73798243a3fb6796755f7733555f8553fb6777847e4f3d2d13738

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_config_backup-2.1.8-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 Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page