Kimai backup and restore
Pair the database export with configuration, invoice templates and any locally installed extensions.
Last updated
On this page (5)
Kimai ยท Backup and restore
Before you start
- Matching Kimai and plugin versions.
- MySQL or MariaDB client.
- Fresh database and access to the Kimai installation tree.
Procedure
- Pause writes and run
mysqldump --single-transaction -u kimai2 -p -h 127.0.0.1 kimai2 > kimai.sql(adjust account, host and name). - Copy
.env,.env.local,config/packages/local.yaml, and thevar/data,var/export,var/invoices,var/packagesandvar/pluginsdirectories where present. - On the isolated installation, import with
mysql -u kimai2 -p kimai_test < kimai.sql; put back the files, set test database details, then refresh production-mode cache withbin/console kimai:reload --env=prod.
Verify the result
- Compare a known timesheet and project total to the source baseline.
- Check a custom invoice template and plugin are available without sending an invoice.
