The Backups tab arrived in version 0.3.5.
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.
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
.envfile. 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.envsomewhere 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
- MySQL or MariaDB
- SQLite
In phpMyAdmin (or your host’s database tool), choose your database, open Import, and select the downloaded 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.
.sql.gz file as it is. It replaces the tables in that database. From a terminal: