Send each verified instance backup to a WebDAV folder, as a backup destination in this package #6
Labels
No labels
bug
documentation
enhancement
performance
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-dav#6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The list of DAV improvements gives the storage component a second use: "and/or backup postulo data (on the server/admin side)". This package does nothing with backups, and the core would not call it if it did.
write_backup(src/postulo/core/backup.py:325in the core) writes one verified.tar.gzto a local directory,POSTULO_BACKUP_DIRby default, and calls nothing afterwards. Connections are per person (Connection.owneris required), and the only instance-level plugin configuration is the transports' columns onSiteSettings. postulo/postulo#242 (open, 0.6.0) plans the Backups section with no remote destination. So this is the plugin half of postulo/postulo#325, and waits for it.What the plugin should do
https://rule invalidate().DAV:quota-available-bytes, asked by name (RFC 4331 §3), below the archive's size fails before a byte is sent, saying how much is needed. Nextcloud's -1, -2 and -3 (not computed, unknown, unlimited) mean go ahead; a 507 mid-upload is reported as a full folder.postulo-backup-<stamp>.tar.gz), withIf-None-Match: *. On a retry, a 412 over a file of the archive's size means the reply was lost, and counts as sent.MKCOL /remote.php/dav/uploads/<user>/<id>, chunks numbered 1 to 10000, of 5 MB to 5 GB, thenMOVE <id>/.fileto the target withOverwrite: F(RFC 4918 §10.6), aDestinationheader on every step andOC-Total-Lengthfor an early refusal. The server drops unfinished uploads after 24 hours; a retry starts a new one. Elsewhere, onePUT. None of this was tried against a real Nextcloud.DELETEcarriesIf-Matchwith the recorded ETag. How many to keep is the core's setting.src/postulo_dav/dav.pyare shared with #5; whichever lands first does them.The credential is kept on the instance and opens a folder of archives holding everyone's data. Whoever takes over the instance holds it, and one that can delete for retention can delete every off-site archive. The README recommends one confined to the backup folder and used for nothing else: a Hetzner Storage Box sub-account (only its own sub-directory, over WebDAV) or a dedicated Nextcloud account. A Nextcloud app password cannot be narrowed to a folder, a Fastmail one only by protocol.
Encryption. The archive holds everyone's data in clear; only the stored secrets are encrypted, under a key it leaves out. It should be encrypted before it leaves the machine, decided with postulo/postulo#242 §3 in postulo/postulo#325 so every destination gets the same answer. This plugin sends what it is handed and encrypts nothing itself.
Decisions
/remote.php/dav/files/) and above a threshold set when it is built; plainPUTelsewhere.Needs from the core
postulo/postulo#325: the kind, instance-level settings and secrets, the call after an archive verifies, retries, remote retention, and the outcome on the Backups page. Nothing here runs before it lands, beyond the shared client work; until then, the wiki's cron plus restic, borg or age carry archives off the machine.
New strings go through
uv run postulo-messages extract, fr-fr and pt-pt filled on the commit (the test gates them), the 23 EU catalogues before a tag (uv run pytest -m release). The kind's names are new on the surface, so the core pin moves (pyproject.toml's dev group pins commit 1d6cdd7e0) andtests/test_surface.pyis extended.Done when
PUT, the chunked path, a full folder and a listing href outside the folder.From the list of DAV plugin improvements of 2026-09-30.