Skip to main content
The Backups tab arrived in version 0.3.5.
A backup is a copy of your database: affiliates, referrals, commissions, payouts, settings and your team. It is the part of Affiliate Manager that cannot be re-downloaded, so it is the part worth protecting. Open Settings → Backups (administrators only).

Create a backup

Press Create a backup now. It takes a few seconds, longer for a very large database. The backup appears under Your backups with when it was made, its type and its size. Press Download to save a backup to your computer, or Delete to remove it from the server.
A backup on the same server does not protect you if the server is lost. Download the backups you care about and keep a copy somewhere else. Backups contain personal data (affiliates’ names, emails and payout details), so keep them private.
Backups are stored in storage/app/backups, outside the public web folder, and only administrators can list, download or delete them.

Automatic nightly backups

Under Automatic backups, tick Back up automatically every night and choose how many to Keep (1 to 60, default 7). A backup is made at about 02:30 every night, and older ones beyond that number are deleted afterwards, manual ones included. This needs the cron job to be running. If a nightly backup fails (for example the disk is full), the dashboard says so and the Backups page shows why.

What a backup does not contain

  • Your .env file. It holds the app key that unlocks everything stored encrypted: affiliates’ payout details, your SMTP password and your license key. A database backup restored without the same app key cannot read those fields, so keep your own copy of .env somewhere safe. It is deliberately left out of backups so that it never travels inside a downloadable file.
  • The program files. They come from the release zip.
  • Your uploaded logo. Upload it again after a restore.

Restoring a backup

In phpMyAdmin (or your host’s database tool), choose your database, open Import, and select the downloaded .sql.gz file as it is. It replaces the tables in that database. From a terminal:
Restore into the same version of Affiliate Manager that made the backup, then, if you are on a newer version, open the site so the database upgrades itself.

Before an update

The Updates tab links here and shows when your last backup was made. Make one before you update.

Large databases

Backups are made in one request. For a database of many hundreds of megabytes, or on hosting with a very short time limit, use phpMyAdmin or your host’s own backup tool instead.