You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e6113ba
Browse filesBrowse the repository at this point in the historyBrowse files
Add automated backup/restore and text-file versioning
Backups:
- scripts/backup.sh bundles a pg_dump and the storage (+ quarantine) directories
into one timestamped archive, with optional retention (BACKUP_RETENTION). It
reads connection details from .env without sourcing it. MASTER_KEY is
deliberately excluded and must be kept separately.
- scripts/restore.sh restores the database and storage from an archive (guarded
by an explicit confirmation). Verified to round-trip end to end.
Versioning (text-like files: txt, md, csv, json, log, yaml, …):
- Re-uploading a file under the same name in the same folder retains the previous
content as a FileVersion instead of creating a duplicate. The old ciphertext
blob becomes the version's, so no data is copied.
- Endpoints to list, download and restore versions; restore is a metadata swap
that preserves the current content as a new version. A bounded number of
versions is kept (older ones pruned, blobs + quota released).
- Quota accounting covers versions on upload, restore, prune, file delete and
folder delete; the orphan GC now treats version blobs as live.
- Drive gains a Versions action.
Tests: a versioning integration test (create version, download old, restore,
quota consistency). Suite now 28 API tests. Docs + checklist updated.
0 commit comments