Database backups to your own bucket.

ServerDog backs up MySQL, MariaDB and PostgreSQL databases on a schedule. The server dumps each database with the engine’s own tool, compresses it and uploads it to an S3-compatible bucket in your account, then deletes backups beyond the number you keep. It runs from cron on the server, so it works while your Mac is off. Backups cover databases only, not files.

By ServerDog. Updated .

Key facts

  • ServerDog dumps databases with mysqldump, mariadb-dump or pg_dump, compresses each dump with gzip and uploads it as a .sql.gz file.
  • Backups go to an S3-compatible bucket in your own account: Amazon S3, Cloudflare R2, Backblaze B2, DigitalOcean Spaces, Wasabi or MinIO.
  • A plan runs hourly, nightly, weekly or on any five-field cron schedule, and keeps the newest 1 to 365 backups (7 by default).
  • Old backups are deleted only after a new one succeeds.
  • ServerDog backs up databases, not files, and restoring a dump is done by hand.

How does a backup run?

  1. cron on the server starts the plan at its scheduled time.
  2. The server dumps each database in the plan with the database’s own tool and compresses it with gzip.
  3. It uploads each file to your bucket, in a folder named after the time of the run.
  4. It deletes the plan’s oldest folders beyond the number you chose to keep.
  5. It removes the local copies and records the run: when it started and finished, its size, and the error if it failed.

Nothing passes through your Mac or through ServerDog’s makers. The dump goes from your server straight to your bucket.

What is in a backup plan?

Setting What you choose
Databases One or more databases on the server.
Schedule Hourly, nightly at 3:00, weekly on Sunday at 3:00, or any five-field cron schedule.
Keep the newest 1 to 365 backups. 7 by default.
Storage The bucket’s endpoint, region, name, an optional folder, and an access key and secret key.

Test Storage writes and deletes a small object, which is exactly what a backup needs the keys to allow. Back Up Now runs a plan straight away. A server can have up to 20 plans, so different databases can go to different buckets on different schedules.

How is each database dumped?

Database Tool Options
MySQL 8.4 mysqldump --single-transaction --quick --routines --triggers --events
MariaDB 11.8 mariadb-dump --single-transaction --quick --routines --triggers --events
PostgreSQL 18 pg_dump --clean --if-exists

With --single-transaction, MySQL and MariaDB dump a consistent snapshot of InnoDB tables without locking them, so the site keeps working during a backup. The dump includes stored routines, triggers and events. PostgreSQL dumps are plain SQL that drops and recreates each object when restored.

Where do the backups go?

To any storage that speaks the S3 interface. In the bucket, each plan has its own folder, and each run a folder named with its UTC time, holding one .sql.gz file per database.

The secret key is stored on the server, which is the machine that uploads. ServerDog sends it there once and never reads it back. Give the key access to that one bucket only.

How do I restore a backup?

ServerDog has no restore button. Download the file from your bucket to the server and feed it to the database:

# MySQL or MariaDB
gunzip < app.sql.gz | mysql app

# PostgreSQL
gunzip < app.sql.gz | sudo -u postgres psql app

Restore into a spare database first if you only need to look something up. A backup you have never restored is a guess, so try this once before you need it.

What happens when a backup fails?

The run is recorded as failed with the first line of the error, and the older backups stay in the bucket: nothing is deleted unless the new backup succeeded. If the server has a notification webhook, it posts the failure to Slack or Discord by itself. The app shows the same in the Backups tab.

What ServerDog does not do

  • It does not back up files, uploads or the server’s disk. Use object storage for uploads and your provider’s snapshots for the whole machine.
  • It does not encrypt dumps itself. Turn on encryption at rest for the bucket.
  • It does not restore for you, and it does not test restores.
  • It does not keep point-in-time logs. You can go back to a backup, not to any minute between two.

Go deeper

Questions

How do I back up a MySQL database to S3 automatically?

Run mysqldump on a schedule, compress the output and upload it to a bucket, then delete the oldest copies. ServerDog does this from a backup plan: you choose the databases, a schedule and a bucket, and the server runs it with cron.

Where are ServerDog’s backups stored?

In an S3-compatible bucket in your own account: Amazon S3, Cloudflare R2, Backblaze B2, DigitalOcean Spaces, Wasabi or MinIO. ServerDog has no storage of its own and never receives a copy.

Does backing up lock the database?

For MySQL and MariaDB, ServerDog dumps with --single-transaction, which reads a consistent snapshot of InnoDB tables without locking them. PostgreSQL’s pg_dump also works from a snapshot while the database stays in use.

How do I restore a backup?

By hand. Download the .sql.gz file from your bucket and feed it to the database, for example gunzip < app.sql.gz | mysql app. ServerDog has no restore button.

Does ServerDog back up files and uploads?

No. Backup plans cover databases only. Keep uploads in object storage, or copy them with a scheduled job of your own.

Are the backups encrypted?

ServerDog compresses each dump with gzip and uploads it over HTTPS, and does not encrypt the file itself. Turn on encryption at rest for the bucket at your storage provider.

Do backups run when my Mac is off?

Yes. The schedule is a cron entry on the server, and the server dumps and uploads by itself. If a backup fails, the server can post the error to a Slack or Discord webhook.

Last updated by ServerDog.

Your servers. Your Mac. Nothing in between.

For macOS 15 or later.