Getting started

Freshet Backup makes a copy of your WordPress database on a schedule and keeps it in your Dropbox. You connect Dropbox once, choose how often, and it takes care of the rest. If a backup fails or does not happen on time, a notice in wp-admin says so.

It backs up the database only: not files, not uploads. There is no restore button; restoring is two steps by hand.

Requirements

GPL-2.0-or-later. This page documents 1.1.0.

Install

Install and activate. Nothing runs yet: until Dropbox is connected there is no schedule and no backup. The screen is under Settings → Freshet Backup, and the Plugins screen has a Settings link to it.

Connect Dropbox in three steps

No developer account and no API keys. On Settings → Freshet Backup:

  1. Allow access at Dropbox. Press Connect Dropbox. Dropbox opens in a new tab. Sign in to the account that should hold the backups and press Allow. Freshet Backup can only see its own folder there.
  2. Paste the code Dropbox shows. Dropbox shows a code after you press Allow. Paste it into the field and press Finish connecting. The attempt expires after an hour; if it does, press Connect Dropbox again.
  3. Connected. Backups are now on, and run daily until you choose otherwise.

The connection is saved in wp-config.php, not in the database, and it only works on this site's own addresses. A copy of the site on a staging or development server, or a database pulled into a migration tool, carries no access to your Dropbox and does not back up into it. Before it changes wp-config.php, the plugin keeps a copy of the file in its private backup folder and checks the new version for errors. If it cannot write the file, the screen shows the lines to paste yourself.

Prefer your own Dropbox app? Set the three FRESHET_BACKUP_DROPBOX_* constants instead; they take precedence over the screen. See wp-config constants.

Choose how often

Next to Back up, pick one and press Save: every hour, every 6 hours, every day (the default) or every week.

The new schedule applies straight away. A FRESHET_BACKUP_INTERVAL constant in wp-config.php overrides the screen and locks the choice; the screen then says it is set there.

Run the first backup

Press Run backup now. The page waits while the backup runs, then reloads with the result in Last run: the file name, its compressed size, the number of tables, and how long it took. A backup only counts once Dropbox confirms it arrived complete; Where backups go explains that check.

After that, backups run on the schedule. How WordPress runs a schedule, and what happens when it does not, is in Schedule and missed backups.

What is in a backup

Every table that starts with your site's table prefix, as one compressed SQL file (.sql.gz). To include every table in the database, set FRESHET_BACKUP_ALL_TABLES to true.

The database is read through WordPress itself, a few rows at a time. It needs no shell access and no external dump tool, and does not need much memory.

Restoring a backup

Download the file from Dropbox and import it into the database:

gzip -dc backup.sql.gz | mysql database_name

Disconnecting

Disconnect Dropbox on the same screen removes the site's access at Dropbox and takes the lines out of wp-config.php again. Backups already in Dropbox stay there. If Dropbox cannot confirm it withdrew the access, the screen says so: remove "Freshet Backup" under Connected apps in your Dropbox account settings to be sure.

Next: Where backups go.