Before you begin using Matomo in production, you should set up a backup host, schedule
automated backups, and develop a recovery plan as part of an overall automated backups plan.

Backup host requirements and recommendations

  • Storage space for the backup host: 10x the size of the uncompressed Matomo database.
    • For example:
      • if your database is 50GB uncompressed, backup storage should be 500GB.
      • If your database is 200GB uncompressed, backup storage should be 2TB.
  • vCPU: 2
  • Memory: 2GB
  • We recommend that the backup host and your Matomo instance be geographically distant from each other. This ensures that backups are available for recovery in the face of major disaster or network outage at the primary site.

What to backup and how often

How often? Backup retention Which servers to backup? How to backup?
MySQL database containing all of Matomo data daily backup(full) Keep for 30 days DB server see How to make a full MySQL database backup
Matomo codebase including the config.ini.php file and any other custom file daily backup Keep for 30 days All web servers create an archive of Matomo files and copy to backup server

$ tar cvfz matomo-codebase.tar.gz /path/to/matomo/

Log files (Web server, Matomo cron and application logs). daily backup Keep for 6-24 months All web servers copy any new log files to the backup server. Log files are listed in the Logging section.
Previous FAQ: How do I momentarily disable Matomo User Interface and/or Matomo visitor Tracking?