DanSheps / netbox-config-backup

A configuration backup system using napalm
Apache License 2.0
90 stars 7 forks source link
netbox netbox-plugin

Netbox Configuration Backup

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

Features

Future

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
}

}

3. Migrate: `python3 netbox/manage.py migrate`
4. 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:

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