Backup and Restore
Before an update, migration, or major project change, create a consistent backup of both the client database and files.
What to back up
- the client site database;
src/config.php;internal_data, including the installation identity;datawith public user files;- the rest of the site tree when templates or styles were customized locally.
Cache, temporary update ZIP files, and old logs may be excluded when your retention policy allows them to be rebuilt.
Database backup
mysqldump --single-transaction --routines --triggers -u USER -p DATABASE > client-backup.sql
Do not put a password directly on the command line or store the backup under the public website root.
Verify and restore
A backup is valid only after a test restore. Restore files in a closed environment, import the database, verify local connection and cookie settings, restore ownership and permissions, and run the connection check before opening the site.
If the installation identity was not preserved, revoke the old installation and enroll the restored site with a new one-time code.