netbox-device-backups-plugin 0.1.0
A plugin to manage and automate configuration snapshots for network devices.
Requires Python: <3.13,>=3.12

# NetBox Device Backups Plugin

NetBox plugin for Device Backups.



## Features

- Capture on-demand and scheduled configuration snapshots for NetBox devices with normalized diff visualization.
- Store reusable authentication records and assign credentials by device, device type, platform, site, location, tenant, tenant group, or tags with deterministic priority rules.
- Define connection profiles to customize transport parameters (port, timeouts, transport) per device scope for the snapshot collector.
- Upload and enable custom collector provider modules through the UI to extend snapshot support for new device types without redeploying the plugin.
- Enforce enterprise retention with reusable snapshot policies and scoped assignments that automatically prune historical data based on age or version counts.

## Compatibility

| NetBox Version | Plugin Version |
|----------------|----------------|
|     4.0        |      0.1.0     |

## Installing

For adding to a NetBox Docker setup see
[the general instructions for using netbox-docker with plugins](https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins).

While this is still in development and not yet on pypi you can install with pip:

```bash
pip install git+https://github.com/colbyjoines/netbox-device-backups-plugin
```

or by adding to your `local_requirements.txt` or `plugin_requirements.txt` (netbox-docker):

```bash
git+https://github.com/colbyjoines/netbox-device-backups-plugin
```

Enable the plugin in `/opt/netbox/netbox/netbox/configuration.py`,
 or if you use netbox-docker, your `/configuration/plugins.py` file :

```python
PLUGINS = [
    'netbox_device_backups_plugin'
]

PLUGINS_CONFIG = {
    "netbox_device_backups_plugin": {},
}
```

## Development

This project uses modern Python tooling with [uv](https://docs.astral.sh/uv/) and [Ruff](https://docs.astral.sh/ruff/).

### Quick Start

1. Install [uv](https://docs.astral.sh/uv/getting-started/installation/):
   ```bash
   curl -LsSf https://astral.sh/uv/install.sh | sh
   ```

2. Set up the development environment:
   ```bash
   ./scripts/setup-dev.sh
   ```

### Development Commands

```bash
make help          # Show all available commands
make dev-install   # Install with dev dependencies
make lint          # Run linting
make format        # Format code
make check         # Check formatting and linting
make fix           # Fix linting issues and format
make test          # Run tests
make test-cov      # Run tests with coverage
```

### Tools Used

- **[uv](https://docs.astral.sh/uv/)**: Fast Python package manager and project manager
- **[Ruff](https://docs.astral.sh/ruff/)**: Fast Python linter and formatter (replaces Black, isort, flake8)
- **[pytest](https://pytest.org/)**: Testing framework
- **[pre-commit](https://pre-commit.com/)**: Git hooks for code quality

## Credits

Based on the NetBox plugin tutorial:

- [demo repository](https://github.com/netbox-community/netbox-plugin-demo)
- [tutorial](https://github.com/netbox-community/netbox-plugin-tutorial)

This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [`netbox-community/cookiecutter-netbox-plugin`](https://github.com/netbox-community/cookiecutter-netbox-plugin) project template.