Skip to content

Knowledgebase & Docs

Search guides, configuration tutorials, API references, and troubleshooting solutions.

Back up and restore KBilling

Category: Feature Tutorials 1 Views 0 Helpful Votes

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.php and 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.sql

Use 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

  1. Create an isolated staging database and hostname.
  2. Restore the database and files.
  3. Set staging-safe URLs and disable outbound email, gateway callbacks and provisioning.
  4. Verify administrator login, decryption of stored credentials, invoices, tickets and attachments.
  5. Record recovery time and any manual corrections.
Encryption keyA database backup without the original KBilling encryption key may leave stored gateway, registrar and server credentials unrecoverable.