TWERPLEX

Version 1.0.0 · CodeCanyon edition · PHP 8.3 or newer

Backups and restore

Database and file backups on a schedule, kept locally and optionally copied to S3-compatible storage or an FTP server, restored by the owner from the staff area or the command line.

Schedule and retention

System → Backups → Settings. By default the database is backed up every day at 02:30 (server time) and the files once a week; the newest 7 database and 4 file backups are kept. Both schedules can be changed or switched off, and Back up now starts one immediately. Backups run from the cron job in steps, so large sites do not hit time limits.

A file backup covers the application folders, uploads and extensions. It never includes .env, and the database dump is encrypted with a key derived from the application key in .env. Keep a copy of .env somewhere safe: without its APP_KEY a backup cannot be read.

Where backups are stored

Locally under storage/app/private/backups/, which the web server never serves. A remote copy can be sent to:

Uploads are retried by the scheduler. The backup list shows for each backup whether the remote copy exists.

Restoring

Only the owner can restore, after confirming with their password and a two-factor code. A restore first takes a safety backup of the current state, puts the site into maintenance mode, restores the database and then the files, rebuilds caches and brings the site back. The staff area shows the progress; if the browser is closed, the cron job finishes the restore.

php artisan twerplex:backup                 # make a backup now
php artisan twerplex:backup:list            # list backups with their UUIDs
php artisan twerplex:backup:restore <uuid>  # restore one (asks for confirmation unless --force)
php artisan twerplex:backup:prune           # apply the retention now

Moving to another server

  1. Make a database and a file backup and download them (or copy them from the remote target).
  2. Install TWERPLEX on the new server from the same package version.
  3. Copy .env from the old server over the new one, keeping the new database settings if they differ, and put the backup files into storage/app/private/backups/.
  4. Run php artisan twerplex:backup:list and restore the database backup, then the file backup.
  5. Change APP_URL if the address changed, run php artisan optimize:clear and php artisan optimize, and add the cron job.

Integrity check

Operations → Recovery → Integrity compares the installed files with the signed list that shipped with this version and reports files that were changed, removed or added, including PHP files that appeared in the upload folders. It runs weekly from the scheduler and on demand.

↑