Metadata-Version: 2.4
Name: django-recovery
Version: 0.3.0b1
Summary: Encrypted, deduplicated Django database and media backups, powered by restic
Author-email: Mehedi Hasan Bappi <mehedibubt34@gmail.com>
License: BSD-2-Clause
Project-URL: Homepage, https://github.com/m16bappi/django-recovery
Project-URL: Documentation, https://m16bappi.github.io/django-recovery/
Project-URL: Repository, https://github.com/m16bappi/django-recovery
Project-URL: Issues, https://github.com/m16bappi/django-recovery/issues
Project-URL: Changelog, https://github.com/m16bappi/django-recovery/releases
Keywords: django,backup,restore,restic,database,s3,gcs,azure
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Framework :: Django :: 5.2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Archiving :: Backup
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: django>=4.2
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-django; extra == "test"
Provides-Extra: docs
Requires-Dist: mkdocs-material; extra == "docs"
Dynamic: license-file

# django-recovery

Encrypted, deduplicated Django database and media backups, powered by [restic](https://restic.net/).

`django-recovery` turns your Django `DATABASES` (and optionally your media directory)
into restic snapshots: always encrypted, deduplicated across backups, and restorable
through a management command.

> **Status:** 🚧 beta / under active development. APIs and settings may change before 1.0.

## Highlights

- **Encryption is always on** — every snapshot is encrypted client-side; there is no
  plaintext mode to forget to turn on.
- **Deduplication** — daily backups cost only the delta, not a full copy each time.
- **Atomic failure semantics** — a failed dump produces **no snapshot**, never a
  half-written one.
- **Any storage** — local disk, S3 (and compatibles), GCS, Azure, SFTP, or anything
  via rclone.
- **Guarded restores** — typed confirmation plus a tag guard that refuses to restore
  a snapshot into the wrong database.

## Install

```bash
pip install django-recovery
```

Requires the [restic](https://restic.net/) binary (>= 0.16) on `PATH`, plus the
command-line client for each database engine you back up (`pg_dump`/`psql`,
`mysqldump`/`mysql`, or `sqlite3`).

## Quickstart

```python
# settings.py
import os

INSTALLED_APPS = [
    # ...
    "django_recovery",
]

RECOVERY = {
    "BACKEND": "django_recovery.backends.LocalBackend",
    "OPTIONS": {"path": "/var/backups/myapp-restic"},
    "PASSWORD": os.environ["RESTIC_PASSWORD"],
    "DATABASES": ["default"],
}
```

```bash
python manage.py recovery init
python manage.py recovery backup
python manage.py recovery snapshots
```

## Documentation

Full documentation — settings reference, storage backends, management commands,
scheduling, and FAQ — lives at
**[m16bappi.github.io/django-recovery](https://m16bappi.github.io/django-recovery/)**.

## Related

- **[restic](https://restic.net/)** — the backup engine that does the real work.
- **[Source repository](https://github.com/m16bappi/django-recovery)** — issues and
  contributions welcome.
