bit Boilerplate has no backup or restore for the server its CD deploys
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- csharp, docker-compose, mysql, postgresql, redis, sqlite
- Domain
- databases, devops, infrastructure
Research direction
Start with the R&D notes and verify the listed tool capabilities against their sources, then resolve the open choices for supported database options and restore testing. Trace how the app host adds publish-mode containers and how the deploy skill configures deployment; done means a design that covers the stated backup, restore, retention, and restore-test requirements.
Written by the indexing model from the issue text.
Description
The deploy skill and the CD that came with #14382 put a project's server on the team's own Linux VM, as a Docker Compose project that .NET Aspire publishes from the app host. Nothing backs that server up yet, and nothing restores it.
We'll build our own backup and restore tool for this. It may use some of the existing tools below inside, but it's ours, and the template sets it up with the rest of the deployment.
What it has to do
- Back up what a deployed project keeps on its server:
- its database: PostgreSQL, SQL Server, MySQL or SQLite, depending on the project's options;
redis-persistent, which holds Hangfire's jobs and the distributed lock (redis-cacheneeds no backup);- the uploaded files, when they stay in the api's local volume, and a copy of them when they live on S3-compatible storage;
- the small volumes: the Aspire dashboard's telemetry and DbGate's settings.
- Write the backups, encrypted, to the project's own S3-compatible storage (the template recommends Cloudflare R2), on a schedule and with retention.
- Restore to the latest backup, and to a point in time where the engine allows it.
- Test its restores by itself, regularly, and fail loudly when one doesn't work.
- Stay free, and work on a server that has no inbound port: the runner pulls its jobs and cloudflared dials out.
- Fit the template: the app host adds it in publish mode, and the
deployskill sets it up with the rest.
R&D (2026-10-30)
Release dates were read from the GitHub API on 2026-10-30. Everything listed is free unless marked paid. These notes are input for the design, so check each claim against its source before relying on it.
Database-native tools
| Tool | Covers | S3 / R2 | Schedule and retention | Encryption | Point in time | Restore | License, latest |
|---|---|---|---|---|---|---|---|
| WAL-G (release binaries, no official image) | PostgreSQL, MySQL, Redis | S3; R2 reported working in wal-g#2550 | cron; delete retain FULL n |
libsodium or PGP | PostgreSQL through WAL, MySQL through binlogs | backup-fetch, then restore_command='wal-g wal-fetch %f %p' and recovery_target_time |
Apache-2.0, 3.0.9 (Aug 2026) |
| pgBackRest (no official image) | PostgreSQL | S3; R2 works, with retries added for its 429s (#2661) | external cron; full/diff kept by count or time | AES-256 | yes | restore --type=time --target=… |
MIT, 2.60.0 (Oct 2026) |
| barman-cloud | PostgreSQL | --endpoint-url; R2 not documented |
cron; recovery window | S3 server-side | yes | barman-cloud-restore and barman-cloud-wal-restore |
GPL-3.0, 3.20.1 (Sep 2026) |
| itbm/postgres-backup-s3 | PostgreSQL, pg_dump |
S3_ENDPOINT |
SCHEDULE; DELETE_OLDER_THAN |
AES-256 | no | the same image with BACKUP_FILE=latest |
MIT, active |
SQL Server BACKUP TO URL |
SQL Server 2022 and later, Linux included | s3://; R2 reported working |
external | built in | log backups and STOPAT |
RESTORE … FROM URL |
built in, not in Express |
MySQL Shell (ships in mysql:9.7) |
MySQL | s3EndpointOverride; R2 untested |
external | none found | by GTID, from util.dumpBinlogs |
util.loadDump, then util.loadBinlogs({stopBefore}) |
GPLv2, 9.7.1 |
| nfrastack/db-backup | dumps of PostgreSQL, MySQL, SQL Server, Redis, SQLite | S3 | cron; last N or by age | age | no | CLI or guided | AGPL core, paid tier ($129/yr), 5.0.6 (Oct 2026) |
| Litestream | SQLite | R2 detected automatically | continuous; snapshot.retention (default 24h) |
SSE-C only | yes, within retention | litestream restore -timestamp … -o … |
Apache-2.0, 0.5.17 (Aug 2026) |
Volume and file tools
None of these has point-in-time restore; a restore goes back to a snapshot.
| Tool | S3 / R2 | Schedule and retention | Encryption | Stops or quiesces containers | Restore | License, latest |
|---|---|---|---|---|---|---|
| offen/docker-volume-backup | S3; R2 works | BACKUP_CRON_EXPRESSION, BACKUP_RETENTION_DAYS |
GPG or age | yes: a stop-during-backup label and archive-pre exec hooks, through the Docker socket |
untar into the volume from a throwaway container | MPL-2.0, 2.50.0 (Oct 2026) |
| restic (Backrest adds a UI) | generic S3 | cron or Backrest; forget --keep-* |
always on | no; database dumps through --stdin-from-command |
restic restore or dump |
BSD-2, 0.19.1 (Jul 2026) |
| Kopia | generic S3 | policies, run by kopia server; GFS |
always on | opt-in actions | snapshot restore or mount |
Apache-2.0, 0.23.1 (Jun 2026) |
| Borg with borgmatic | S3 only in Borg 2, still beta (2.0.0b25) | borgmatic; GFS | optional | dump hooks for PostgreSQL, MySQL and SQLite, none for SQL Server | borgmatic restore |
BSD-3 and GPL-3.0; Borg 1.4.5, borgmatic 2.2.0 |
| Duplicati | S3 | built in | AES or GPG | pre/post scripts | from its UI, or straight from the backup files | MIT, 2.4.1 (Oct 2026); its console is paid and optional |
| rclone | a Cloudflare R2 provider | external; dated --backup-dir |
a crypt remote |
no | copy back | MIT, 1.75.2 (Oct 2026) |
Notes
- Consistency. A plain VM has no filesystem snapshots, so a file-level tool that reads a live database volume gets a copy that isn't even crash-consistent. Dump first, stop the container, or use a database-native tool.
- WAL-G
backup-pushcan stream over the replication protocol (docs), so a sidecar needs no access to PGDATA. That mode has no delta backups and uses a single stream.- WAL archiving needs
wal-pushinside the database image. The alternative iswal-receivein a sidecar, which holds a replication slot. - wal-g#2550 reports that the official
postgres:18image (and sopgvector/pgvector:pg18) has no CA certificates, and that WAL-G then retries the TLS error to R2 without logging it, which looks like a hang.
- pgBackRest and barman-cloud need their binary next to PGDATA: a custom database image, with backups run through
docker execor from a sidecar that shares PGDATA. - eeshugerman/postgres-backup-s3 has been archived since Aug 2024. The MySQL counterpart of the dump images is databacker/mysql-backup (MIT, 1.5.0).
- SQL Server
- Backup to S3-compatible storage isn't supported in Express, the only free production edition; the container image defaults to Developer. On Linux, the S3 endpoint's CA has to be in
/var/opt/mssql/security/ca-certificatesbefore SQL Server starts. - The free route is a scheduled
sqlcmdrunningBACKUP DATABASEandBACKUP LOG … TO DISK(Express has no SQL Agent), into a volume shared with whatever uploads the files, sincesqlservrwrites them. - On a paid edition, the R2 write-up above found the
REGIONoption failing. R2 also wants equal-size multipart parts, while SQL Server's part sizes vary between 5 and 20 MB, so it needs a test at real database size. - WAL-G's SQL Server mode targets Windows, and its docs cover full backups only.
- Backup to S3-compatible storage isn't supported in Express, the only free production edition; the container image defaults to Developer. On Linux, the S3 endpoint's CA has to be in
- MySQL 9.7. Percona XtraBackup 9.7 is still a release candidate (Jul 2026), so WAL-G would use
mysqldumpandbinlog-push, reading the binlogs from the data volume. - Litestream
- A sidecar on the same named volume is supported, on local disks (not NFS or SMB).
- Microsoft.Data.Sqlite retries busy errors until its command timeout, and the app's own checkpoints make Litestream take extra snapshots.
- Version 0.5 removed client-side encryption.
- Redis
- Redis 8 has the
BACKUP START/SEAL/LIST/CLEANUPcommands, which take a consistent online copy of the multi-part AOF, restored withpreload-file aof:…/appendonly.aof.manifest. - The older route: set
auto-aof-rewrite-percentage 0, wait foraof_rewrite_in_progress:0, copyappendonlydir, then turn it back on. - A
dump.rdbcopied into/datais ignored while AOF is on;preload-file rdb:loads it. - WAL-G (
redis backup-push --type aof), nfrastack and offen's stop label also work. - Restoring an old Hangfire state can run jobs again or drop them.
- Redis 8 has the
- Aspire. Neither Aspire nor CommunityToolkit/Aspire has an integration for any of these. Each would be a container the app host adds in publish mode only (
AddContainerorAddDockerfile), sharing the named volumes it backs up throughWithVolume(sameName, path, isReadOnly: true)and getting labels throughPublishAsDockerComposeService. - Cloudflare R2
- The free tier covers 10 GB-month, then $0.015 per GB.
- R2 has no S3 versioning or Object Lock. Its bucket locks also block overwrites, so they fit only prefixes a tool never rewrites.
- Backups want a bucket of their own, with a token scoped to it.
What the research would use if we only combined existing tools
- PostgreSQL: WAL-G. A thin image
FROM pgvector/pgvector:pg18that addswal-gandca-certificates, witharchive_command='wal-g wal-push %p'andarchive_timeout=60; a cron sidecar runsbackup-pushnightly anddelete retain FULL 7, with a libsodium key. pgBackRest for large databases. - SQL Server Express: a nightly full backup and a log backup every 15 minutes (FULL recovery model) with
sqlcmd, into a backup volume that restic pushes to R2. - MySQL: MySQL Shell in a
mysql:9.7sidecar,dumpInstancenightly anddumpBinlogsevery 15 minutes, once proven against R2; WAL-G otherwise. - SQLite: a Litestream sidecar with
snapshot.retention: 168h. - Redis: a nightly job running
BACKUP START,SEAL, the copy, thenCLEANUP; offen's stop label is simpler when a few seconds of downtime are fine. - Files: on R2,
rclone syncto the backup bucket with a dated--backup-dirand a lifecycle rule; in a local volume, restic. - Small volumes (dashboard, DbGate): offen nightly, with stop labels, age encryption and 14 days' retention.
- Restore testing: a weekly scheduled workflow on the self-hosted runner that restores everything into throwaway containers on an isolated network, PostgreSQL to "now minus one hour", then checks it:
pg_amcheckand the latest__EFMigrationsHistoryrow,DBCC CHECKDB,PRAGMA integrity_check, RedisDBSIZE, andrestic check --read-data-subset=10%. A failed run is the alert. GitHub turns scheduled workflows off after 60 days without activity in a public repository.
Still open
- Whether MySQL Shell and SQL Server's native backup work against R2 at real database sizes.
- Whether
wal-receiveuploads partial WAL segments. - How Kopia schedules snapshots without its server running.
- Dominant language
- C#
- Stars
- 1.4k
- Forks
- 264
- Avg merge
- 7h 38m
- Merged PRs (30d)
- 544
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bitfoundation/bitplatform
-
BitVariantVariablesBrowserTests fails on the scrolled variables of BitHeaderPossibly taken @yasmoradi claimed this today. Openarea / BlazorUI
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
bitfoundation/bitplatform#15485 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
bitfoundation/bitplatform#15051 ·
Maintainers usually reply within 1 day
-
Prerelease `v-11.0.0-pre-25`Possibly taken @yasmoradi claimed this today. Openprerelease
bitfoundation/bitplatform#15482 · 1 assignee ·
Maintainers usually reply within 1 day
-
Project dependencies are outdatedPossibly taken @yasmoradi claimed this today. Opendependencies
Difficulty 3/5 1-2 days Newbie friendliness 25/100
bitfoundation/bitplatform#15480 ·
Maintainers usually reply within 1 day
-
Bswup's AlwaysPrerender mode doesn't open the cached app when the server is downPossibly taken @msynk claimed this today. Openarea / bswup
bitfoundation/bitplatform#15479 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in bitfoundation/bitplatform
Similar issues
-
chore interpreter small
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
hexide-io/HexIDE#5718 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
PCL-Community/PCL-CE#3907 ·
Maintainers usually reply within 1 day
-
chore
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
lugassawan/swe-workbench#841 ·
-
aikido high security
Difficulty 1/5 Under an hour Newbie friendliness 66/100
dequelabs/axe-core-nuget#312 ·
-
[Bug]: reply would start a thread under a targeted message if its payload carried a reply chain idOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day