Repository navigation
10.1.65
Nextended.Aspire.Hosting.Supabase:
WithDatabaseBackups(o => …): a backup service for the stack (<stack>-backup) — the stack's ownsupabase/postgresimage (pg_dump matches the server) running an embedded Python script, no image of its own.- Backup = database (
pg_dump -Fcof the app's schemas, not Supabase's internal ones) plus every stored file, streamed in parts into the stack's storage (bucketdb-backups) and optional external targets:AddAzureBlobTarget(name, containerSasUrl, prefix?),AddS3Target(…). A target address that is no URL (none) switches it off. - Daily schedule and retention (
RunAt,TimeZone,KeepDaily,KeepWeekly), manual backups. - Restore: safety backup first, then the backup's data into the current schema in one transaction — all or nothing; migration bookkeeping and the backup bucket's own rows stay; then the files.
- Backups on a target a fresh database does not know (after a rebuild) are listed again.
- State and API in the schema
nx_backup(overview,request_backup,request_restore,request_delete,save_settings) — wrap them in your own functions with your admin check. README → "Database Backups".