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

  1. Pause writes and run mysqldump --single-transaction -u kimai2 -p -h 127.0.0.1 kimai2 > kimai.sql (adjust account, host and name).
  2. Copy .env, .env.local, config/packages/local.yaml, and the var/data, var/export, var/invoices, var/packages and var/plugins directories where present.
  3. 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 with bin/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.

Official documentation

Have Pilae operate Kimai

We agree what to monitor, how to recover and who responds when something breaks. Bring your existing deployment or start with a new one.