Sin impuesto Con impuesto

Backups that actually work: the 3-2-1 rule applied to a store

Having backups is not the same as being able to recover the store. We explain what to back up, where to keep it and how to check that it works.

Jesús Meilán
Updated: 26/09/2026 109
Backups that actually work: the 3-2-1 rule applied to a store
Share:

Everyone thinks they have backups until they need them. Then they discover that the backup is on the same server that has gone down, that it does not include the database or that nobody knows how to restore it.

The 3-2-1 rule

  • 3 copies of the data (the original and two more).
  • On 2 different media.
  • 1 of them off your server and away from your hosting provider.

What to back up

  1. Database: orders, customers, products, configuration. It is the most valuable part and the one that changes most.
  2. Images (img/): they can take up a lot of space, but without them the catalogue is empty.
  3. Code: theme, modules, overrides, app/config/parameters.php.
  4. Downloads and uploads (download/, upload/) if you sell virtual products or accept files.

Frequency

  • Database: at least daily; in stores with many orders, several times a day.
  • Files: daily or weekly, depending on how often they change.
  • Before any update or module installation: always.

Consistent dumps

A database dump taken while the store is writing can end up inconsistent. With InnoDB tables, mysqldump --single-transaction solves this without locking the store.

The test almost nobody does

Once a quarter, restore a backup to a test environment and check that the store starts, that there are recent orders and that the images display. If you have never done it, you do not know whether you have backups.

Be careful with external drives: if your backup goes to a USB or network drive, check that it really was connected and mounted when the backup ran. Some systems, if the drive is missing, write the backup to an empty folder on the local disk and finish “without errors”.
Loading...
Cookie consent
Back to top