ShiftMyData

Automatic MySQL and MariaDB backups to cloud storage

A dated, compressed dump of your MySQL or MariaDB database every night, or as often as every 6 hours, kept in Google Drive, Amazon S3, OneDrive or any other cloud.

The do-it-yourself way: mysqldump and cron

On a server that is always on, this is the usual script. It keeps the password out of the command line, where other users of the machine could see it, by reading it from ~/.my.cnf:

#!/usr/bin/env bash
set -euo pipefail
stamp=$(date +%Y-%m-%d-%H%M%S)
file="/var/backups/shop-$stamp.sql.gz"
mysqldump --single-transaction --quick --routines --triggers shop | gzip > "$file"
rclone copy "$file" remote:db-backups/
find /var/backups -name 'shop-*.sql.gz' -mtime +14 -delete

Steps

  1. Sign in, open Databases and press Connect a database. Choose MySQL / MariaDB, or your hosting service by name.
  2. Paste the connection string (mysql://user:password@host:3306/dbname), or fill in the server, database, username and password one by one.
  3. If the database only answers on its own server, fill in the SSH server fields too; it is then reached through that server, and the database address is usually localhost.
  4. Press Schedule on its card. Choose the cloud and folder, how many backups to keep (1 to 365), and how often: every 6 hours, every 12 hours, every day, every Sunday or on the 1st of every month.
  5. Save. The first backup starts at once, and its progress shows in the job list.

What each backup is

Encrypted backups

Give the database a backup passphrase (12 characters or more) and every backup is encrypted with AES-256 before it leaves our server; its name gains .enc. The cloud you save into then holds nothing readable. To open one on your own computer, with the OpenSSL that comes with macOS, Linux and Git for Windows:

openssl enc -d -aes-256-cbc -pbkdf2 -iter 600000 -in shop-2026-11-04-020000.sql.gz.enc -out shop-2026-11-04-020000.sql.gz

Keep the passphrase somewhere safe. Without it nobody, including us, can open the backups.

Restoring a backup

From the app: press Restore on the database's card, pick a backup, type the database's name to confirm, and start. Every table in the backup is dropped and recreated; other tables are left alone.

By hand, with the mysql or mariadb client:

gunzip -c shop-2026-11-04-020000.sql.gz | mysql -h host -u user -p shop

Amazon RDS, Aurora, PlanetScale and shared hosting

Hosted databases usually accept connections only from addresses on an allow list. Add our server's address there, or keep the database private and use the SSH fields to reach it through a server that can.

Limits

Questions

Are MyISAM tables copied consistently?

They are copied, but --single-transaction only gives a consistent snapshot of InnoDB tables. A MyISAM table being written to during the backup may not match the others. Converting it to InnoDB fixes that.

Which user should it use?

One with SELECT, SHOW VIEW, TRIGGER and EVENT on the database is enough for a backup. Restores need a user that can drop and create the tables.

Try it

Prepaid: 30 GB free, then 500 GB for ₹100 or 2,500 GB for ₹500, each valid a year. No card is asked for to start.

Get started

Related