Skip to main content

Automated pfSense backup management tool

Project description

pfSentinel

CI GitHub Release License Python Views

Automated backup and monitoring tool for pfSense firewalls. Built for homelabs.

pfSentinel connects to your pfSense devices over SSH or HTTPS and backs up configuration files, RRD data, package configs, DHCP leases, certificates, logs, ZFS snapshots, and full filesystem archives. It includes change detection, compression, scheduled backups, and notifications via Telegram, Slack, or Windows toast.

Features

  • Full config backup via SSH (SFTP) or HTTPS with CSRF-aware login
  • Extended backup targets -- RRD graphs, package configs, DHCP leases, alias files, certificates, system logs
  • ZFS snapshots with incremental send (pfSense 2.5+)
  • Filesystem archives (tar.gz) as a non-ZFS fallback
  • Change detection -- only saves when config sections actually change
  • SHA-256 verification for every backup file
  • Scheduled backups via Windows Task Scheduler or cron
  • Notifications -- Telegram, Slack, Windows toast, Windows Event Log
  • SSH key authentication -- no password required
  • Credential security -- passwords stored in OS keyring, never in config files
  • Self-update -- check for and install new releases from GitHub
  • Cross-platform -- Windows, Linux, macOS

Quick Start

Download a pre-built binary (no Python required):

Windows (pfs.exe) | Linux (pfs)

Or install with pip (Python 3.13+):

pip install pfsentinel

Then:

pfs setup          # guided first-time wizard
pfs device add     # add your pfSense device
pfs backup run     # run your first backup

See the Installation Guide for all installation methods.

Documentation

Document Description
Installation Guide pip, pre-built binary, and from-source installation
Usage Guide CLI reference, configuration, scheduling, notifications
Extended Backups RRD, packages, DHCP, certs, logs, ZFS, archives
Security Policy Vulnerability reporting, design decisions, credential storage
Contributing Development setup, code style, pull requests
Changelog Version history

What Gets Backed Up

Target Method Description
XML Config SSH / HTTPS Full pfSense configuration (config.xml)
RRD Data SSH Traffic and performance graphs
Package Configs SSH Installed package settings
DHCP Leases SSH Active DHCP lease table
Alias Files SSH URL tables and external alias files
Certificates SSH SSL/TLS certs from the filesystem
System Logs SSH Filter log, system log, custom log files
ZFS Snapshot SSH Full or incremental ZFS snapshot stream
Filesystem Archive SSH Tar archive of critical directories

Third-Party Credits

pfSentinel is built on these open-source libraries:

Library License Purpose
Typer MIT CLI framework
Rich MIT Terminal formatting
Pydantic MIT Data validation
Paramiko LGPL-2.1 SSH/SFTP connections
httpx BSD-3-Clause HTTPS requests
cryptography Apache-2.0 / BSD-3-Clause SSH key handling
Loguru MIT Logging
PyYAML MIT YAML parsing
Requests Apache-2.0 HTTP client
Packaging Apache-2.0 / BSD-2-Clause Version parsing

Paramiko is the only runtime dependency with a copyleft license (LGPL-2.1). When installed via pip, users can freely replace it. For binary releases, pfSentinel uses --onedir bundling so Paramiko remains replaceable. See docs/LICENSE_AUDIT.md for the full dependency license audit.

Contributing

Contributions are welcome! Please read the Contributing Guide before submitting a pull request.

If you find a bug or have a feature request, open an issue.

License

Apache 2.0

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

pfsentinel-0.1.3.tar.gz (155.9 kB view details)

Uploaded Source

Built Distribution

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

pfsentinel-0.1.3-py3-none-any.whl (84.5 kB view details)

Uploaded Python 3

File details

Details for the file pfsentinel-0.1.3.tar.gz.

File metadata

  • Download URL: pfsentinel-0.1.3.tar.gz
  • Upload date:
  • Size: 155.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pfsentinel-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b296730e79738fffd4b714836e51db5f93495016b605f7b84303cdaee06e17cb
MD5 52ffa3a9eccf83ab1333ba04f79a3eec
BLAKE2b-256 0a015b01f04c4c615428b3f335d3fcbbfec8954f455548d4bcb31821b33e40f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfsentinel-0.1.3.tar.gz:

Publisher: ci.yml on NX1X/pfSentinel

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

File details

Details for the file pfsentinel-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pfsentinel-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 84.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pfsentinel-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 68a723e06deb76719b3d281d4e22614a6870cd54edca3538f970c19e5b16d58c
MD5 dc9b3257d439283177f321516e074432
BLAKE2b-256 cb4dcaaa300dea32c6871c33561fcdc0f92dfbfcf1e0e316da1506105fe33f62

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfsentinel-0.1.3-py3-none-any.whl:

Publisher: ci.yml on NX1X/pfSentinel

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