Automate Database Backups Across a Server Fleet with AI: 7 Recipes for 2026 A developer automated database backups across a fleet of servers using the remote-agents MCP server, which connects each host to an encrypted relay room. The setup includes a Postgres primary, two streaming replicas, and an offsite backup box, all controlled via a single AI interface like Claude or opencode. The system uses end-to-end encryption (AES-GCM-256) and supports cross-platform hosts including Windows SQL Server. If you are still SSH-ing into four boxes to confirm last night's dump actually ran, automated database backups across servers are exactly the kind of chore that should be running on autopilot — not eating your evenings. In this guide we wire up postgres backup automation for a small fleet one primary, two streaming replicas, an offsite backup box and drive the whole thing from a single AI interface using the MCP server remote-agents https://www.npmjs.com/package/remote-agents . No agent In short:every database host runs a lightweight agent connected to an encrypted relay room. Your AI assistant Claude or opencode sees the whole fleet as one machine and calls tools like schedule add , fleet exec , file stat , fleet git , send file , and set mode . Cron jobs liveon the, so a nightly host pg dump keeps running even if the relay link drops. Payloads are end-to-end encrypted AES-GCM-256 — the relay forwards ciphertext blind. Let's take a realistic small-SaaS database tier: a Postgres primary, two streaming replicas for read scaling and failover, and an offsite box that only stores compressed dumps. We'll also nod to a Windows SQL Server host at the end to show the cross-platform story. | Host | Role | Tag | Stack | |---|---|---|---| db-primary | Postgres primary writes | db,primary | PostgreSQL 16, Linux | db-replica-1 | Streaming replica | db,replica | PostgreSQL 16, Linux | db-replica-2 | Streaming replica | db,replica | PostgreSQL 16, Linux | backup-box | Offsite dump target | backup | rsync, gzip, Linux | sql-win | SQL Server optional | db,windows | SQL Server 2022, Windows | All agents join one relay room say dbfleet . Tags let you address a group in a single call: target="db,replica" hits both replicas, target="os:linux" hits every Linux box, and target="all" sweeps the whole fleet. Note that multi-tag targets match a host carrying either tag, so db,primary resolves to every database host. ┌────────────── AI Claude / opencode ──────────────┐ │ remote-agents MCP, stdio │ └───────────────────────┬────────────────────────────┘ │ wss:// E2E-encrypted ┌───────┴────────┐ relay CF Worker or self-hosted │ room=dbfleet │ ┌───────────┬───────┴────┬────────────┬─────────────┐ db-primary db-replica-1 db-replica-2 backup-box sql-win db,primary db,replica db,replica backup db,windows The relay is interchangeable: use the hosted Cloudflare Worker, or run your own Rust relay with remote-agents-relay --bind 0.0.0.0:8080 and point agents at ws://your-host:8080 . Either way the relay only ever sees encrypted frames. On each host you install the package once and start the agent with the right tags. For 24/7 database servers you'll want the background service form so the agent survives reboots: once on every machine npm i -g remote-agents the Postgres primary remote-agents run --relay wss://