Foodomaa Docs
Main site Buy — $299
Documentation menu

Backups

A backup is only useful if it can be restored. Take backups on a schedule, store them off the server and test a restore on a staging copy.

What to back up

ItemWhyFrequency
DatabaseOrders, customers, vendors, settlementsDaily, or more often at volume
UploadsMenu images, logos, documentsDaily incremental
.envKeys, database credentials, mail settingsOn change, encrypted
Code/repositoryCustomisations and deployed releaseEvery release, tagged
App signing keysFuture app updatesOn creation, offline copy
Gateway and store accountsRecovery and ownershipDocumented, access controlled

3-2-1 rule

Keep at least three copies, on two different media, with one off-site. A backup on the same VPS does not protect against disk loss, ransomware or a deleted database. Use object storage in a different region and restrict delete permissions.

Schedule

  • Database: daily full backup, retained for 30 days; weekly retained for 12 weeks.
  • Uploads: daily incremental, weekly full.
  • Before every upgrade: on-demand database and file backup.
  • Monthly: restore the latest backup to staging and run a test order.

Restore drill

  1. Provision a clean staging server with the same PHP/MySQL versions.
  2. Restore the database and uploads.
  3. Restore .env with staging credentials.
  4. Run the installer/upgrade steps only if required.
  5. Log in, place a test order and check an image.
  6. Record the time taken and fix anything missing.
Encrypt off-site backups. They contain customer names, addresses, phone numbers and order history. Restrict access and delete old copies according to your retention policy.