Create a recoverable backup of files, database and encrypted configuration, then test restoration.
What must be backed up
- The complete database using a transactionally consistent dump.
configuration.phpand its encryption key.- Customer attachments, downloads, invoice assets and required writable storage.
- Custom themes, hooks and modules.
Create the backup
mysqldump --single-transaction --routines --triggers kbilling > kbilling.sqlUse a protected credentials file or an interactive prompt instead of placing the database password in shell history. Archive application files separately, encrypt both artifacts and send them to storage outside the production server.
Restore rehearsal
- Create an isolated staging database and hostname.
- Restore the database and files.
- Set staging-safe URLs and disable outbound email, gateway callbacks and provisioning.
- Verify administrator login, decryption of stored credentials, invoices, tickets and attachments.
- Record recovery time and any manual corrections.