Skip to main content

Simple package for backups and recovery

Project description

PatronX

Toolkit for PostgreSQL backups, point‑in‑time recovery (PITR) and object‑storage off‑loading, written in modern‑typed

codecov CI Docker PyPI

Command line usage

Install the package in editable mode:

pip install -e .

Once installed, the patron command becomes available:

patronx --version
patronx list
patronx check-db
patronx backup [--plain] [--no-progress]
patronx restore --inp /path/to/backup.dump [--plain] [--no-progress]
patronx server

The server command starts schedulers that enqueue backup and cleanup jobs periodically. The backup schedule is controlled via the BACKUP_CRON environment variable while cleanup uses CLEANUP_CRON. Both take standard cron expressions. When unset they default to running once per day for backups and at 1AM for cleanup. Old backups are removed according to the number of days specified in RETENTION_DAYS (defaults to 30).

Test

pytest

Linting and Formatting

ruff check . --fix
isort .

Generate requirements

pip install pip-tools
pip-compile --output-file=requirements.txt pyproject.toml

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

patronx-1.0.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

patronx-1.0.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file patronx-1.0.0.tar.gz.

File metadata

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

File hashes

Hashes for patronx-1.0.0.tar.gz
Algorithm Hash digest
SHA256 36912f574a16037c549f8905e022b5ca2d4d342b2e506f60ccd4169b36ba364f
MD5 5bf5321c6a699252844f8a7c17d5fa32
BLAKE2b-256 9847dd6aa8a4f2f20902a6177e751bd95ac661c6968100f4f73db58177d078d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for patronx-1.0.0.tar.gz:

Publisher: cd-publish-to-pypi.yml on xdanielsb/patronx

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

File details

Details for the file patronx-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: patronx-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for patronx-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 60f3853c90b9e9bb97641b07e21dfc17fdbd2e7abc8a957f81c499a1f3bdac7c
MD5 0d3058736cb2a072adce0ba6f2eae200
BLAKE2b-256 227d2a427f79ced8366210739907fb960be873fefbcf0c35b99925956e6fedd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for patronx-1.0.0-py3-none-any.whl:

Publisher: cd-publish-to-pypi.yml on xdanielsb/patronx

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