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:
- S3-compatible storage (Amazon S3, Backblaze B2, Wasabi, MinIO and others): endpoint, region, bucket, optional prefix, access key and secret, path-style addressing if the provider needs it.
- FTP or FTPS: host, port, user, password and path. Use FTPS where the server offers it.
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
- Make a database and a file backup and download them (or copy them from the remote target).
- Install TWERPLEX on the new server from the same package version.
- Copy
.envfrom the old server over the new one, keeping the new database settings if they differ, and put the backup files intostorage/app/private/backups/. - Run
php artisan twerplex:backup:listand restore the database backup, then the file backup. - Change
APP_URLif the address changed, runphp artisan optimize:clearandphp 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.