Skip to content

[00] Subset Sync, User guide

Backups and history

Restore the backup taken before every migration, and run a past migration again from the History tab.

Subset Sync backs up a database before it replaces it, and keeps a record of every migration it runs. This page covers restoring a backup and repeating a past migration.

Backups before every migration

Before a push, pull or import replaces a database, Subset Sync backs it up. A push backs up the remote site. A pull or import backs up this site.

The newest three backups are kept. Older ones are deleted when a new one is taken.

To skip the backup, untick Back up this site’s database before replacing it (or the remote site’s, on a push), or pass --skip-backup. The preview shows the backup’s estimated size. On a large database the backup can take about as long as the migration, so skip it only if you have a recent backup from your host or an export.

Restore a backup

  1. Open Subset → Migration → Backups.
  2. Find the backup by its Created date and click Restore.
  3. Confirm. On a production site, type its domain.

A restore is an import, so the current database is backed up first. You can undo a restore by restoring that newer backup.

Each backup also has Download and Delete. On the command line:

wp subset sync backups
wp subset sync restore <backup-name>

Backups live in uploads/.wpmig/. Apache blocks web access there with an .htaccess file. On nginx, add a rule that denies /wp-content/uploads/.wpmig/.

Scheduled backups

With Subset Sync Pro, you can back up the database on a schedule as well. See scheduled backups.

History

The History tab lists the last 50 finished migrations on this site, newest first. It includes push, pull, export and import, whether they started in wp-admin or from WP-CLI. Each entry shows when it ran, the result, how long it took and who started it.

Click Run again on a push or pull to set up the Migrate tab for the same site and direction. Nothing runs until you start it. If the site was a saved connection, its options come back too. If not, the URL is filled in and you paste the key, because history never records keys.

On the command line, run wp subset sync history.

Email when a migration finishes

On the Connection tab, tick Email me when a migration I start finishes, fails, or has been waiting a while to be resumed. It applies to your account only, and only to migrations started from wp-admin. “A while” is 30 minutes without progress.