Show HN: Django-rclone: Database and media backups for Django, powered by rclone
2 points
by cui
2 hours ago
| 1 comment
| github.com
| HN
django-rclone bridges Django's database layer with rclone's file transfer layer. You get native database dumps piped directly to any of rclone's 70+ supported cloud storage backends -- no temp files, no intermediate archives, no Python reimplementations of what rclone already does.
cui
2 hours ago
[-]
Author here. django-rclone is a Django backup package that delegates everything non-Django to rclone.

The existing solution (django-dbbackup) reimplements a lot: Django Storages for upload, GPG in Python for encryption, gzip for compression, regex for backup listing. django-rclone replaces all of that with rclone subprocesses — rclone rcat for uploads, rclone cat for downloads, rclone sync for media, rclone lsjson for listing. Encryption and compression are handled by configuring rclone crypt and compress remotes.

Database dumps stream directly into rclone via Unix pipes — no temp files written to disk. DB passwords are passed via environment variables instead of CLI arguments (which are visible in ps).

The result is significantly less code. Django-rclone only owns what Django must own: database connectors, management commands, and signals. Everything else — storage abstraction, encryption, compression, incremental sync — is rclone's problem. Supports PostgreSQL, MySQL/MariaDB, SQLite, MongoDB, and 70+ storage backends via rclone.

reply