ShipNode provisions a backup script and a systemd timer on the server. Backups go to any S3-compatible bucket (AWS, Cloudflare R2, Backblaze B2, MinIO).
Configure
Section titled “Configure”Add a .backup(...) block to your shipnode.config.ts:
export default shipnode .backend() .ssh({ host: '203.0.113.10', user: 'deploy' }) .deployTo('/var/www/api') .pm2('api') .port(3000) .backup({ schedule: 'daily', retentionDays: 30, s3: { bucket: 'my-backups', region: 'auto', endpoint: 'https://<account>.r2.cloudflarestorage.com', accessKeyId: process.env.R2_ACCESS_KEY_ID!, secretAccessKey: process.env.R2_SECRET_ACCESS_KEY!, }, postgres: { database: 'api_prod' }, files: ['/var/www/api/shared/uploads'], }) .build();Install + run
Section titled “Install + run”npx shipnode backup setup # installs script + systemd timernpx shipnode backup run # run once nownpx shipnode backup status # timer + last runnpx shipnode backup list # list objects in the bucketWhat’s backed up
Section titled “What’s backed up”- Postgres (if
postgresis set):pg_dumpof the named database - Files: any paths listed under
files(gzip tarball)
Each run produces one timestamped object per source. Retention is enforced server-side via S3 lifecycle rules where supported, otherwise via the backup script.