Chatilo
USDPrices shown in US dollars Sign in Start free trial
For platform admins

Back up and restore

Know which files and data to back up, including the app key that unlocks stored tokens, with example commands for MySQL and SQLite and the steps to restore.

Last updated

On this page
  1. What to back up
  2. Back up a MySQL or MariaDB database
  3. Back up a SQLite database
  4. Back up the files
  5. The backups the updater takes
  6. Restore
  7. After moving to a new address
  8. Common problems

Chatilo has no backup screen. You back it up with your server's own tools. Three things together make a complete backup: the database, config/config.php and the uploaded files.

What to back up

WhatWhereWhy
The databaseYour MySQL or MariaDB database, or the file storage/chatilo.sqliteEvery workspace, contact, message, payment, invoice and setting
The configurationconfig/config.phpThe database details, the site URL and the app key
Uploaded filesstorage/uploads/Files uploaded by each workspace (one folder per workspace) and partner logos
The update keyconfig/update-key.phpThe public key your update packages are checked against. It can be set again with php bin/update.php --set-key
The install markerstorage/installed.lockWithout it the installer starts again

You do not need to back up storage/cache/ or storage/sessions/. Losing sessions only signs everyone out. storage/logs/ is optional.

Keep a copy of the application code for the version you run, or the update package you last installed, so you can put the same version back.

The private key that signs your update packages is not on the server. Back it up from the computer where you build packages.

Back up a MySQL or MariaDB database

Run this over SSH. The database name and user are in config/config.php.

mysqldump --single-transaction -u DB_USER -p DB_NAME | gzip > /home/SITE_USER/backups/db-$(date +%F).sql.gz

Your hosting panel may also offer scheduled database backups. Those are fine as long as you also copy config/config.php and storage/uploads/.

Back up a SQLite database

The SQLite database runs in write-ahead mode, so recent changes can sit in the files storage/chatilo.sqlite-wal and storage/chatilo.sqlite-shm next to the main file. Do not copy only the main file while the site is running. Take a consistent copy with the sqlite3 tool:

sqlite3 storage/chatilo.sqlite ".backup '/home/SITE_USER/backups/chatilo-$(date +%F).sqlite'"

Back up the files

From the application folder:

tar -czf /home/SITE_USER/backups/files-$(date +%F).tar.gz config storage/uploads storage/installed.lock

Copy the backups off the server. A backup on the same disk does not survive losing the server.

The backups the updater takes

Before each software update, the files it replaces and a full copy of the database are saved in storage/backups/. These exist so an update can be undone. They are taken only when you update, they sit on the same disk, and older ones are deleted automatically. Do not rely on them as your only backup.

Restore

  1. Put the application code in place, the same version the backup was taken from, with the web root pointing at public.
  2. Unpack the files backup into the application folder so that config/config.php, storage/uploads/ and storage/installed.lock are back. Do this before you open the site in a browser. If config/config.php or storage/installed.lock is missing, the installer starts, and finishing it writes a new app key.
  3. Make config and storage writable by the site user, and make sure the folders storage/logs, storage/cache and storage/sessions exist.
  4. Restore the database (see below).
  5. If the database details or the site address changed, edit the db and url values in config/config.php.
  6. Add the cron job again. See Set up the background worker.
  7. Sign in and open System. Check that Background worker shows Running and Database updates shows Up to date.

To restore a MySQL or MariaDB dump into an empty database:

gunzip -c /home/SITE_USER/backups/db-2026-12-05.sql.gz | mysql -u DB_USER -p DB_NAME

To restore a SQLite backup, stop the cron job first, then replace the database file and remove the leftover write-ahead files:

cp /home/SITE_USER/backups/chatilo-2026-12-05.sqlite storage/chatilo.sqlite
rm -f storage/chatilo.sqlite-wal storage/chatilo.sqlite-shm

After moving to a new address

Webhook addresses contain the site URL. If the address changed, update the webhook address at each payment gateway and ask customers to update the webhook in their Meta app. Chat widget code on customers' websites also points at the old address.

Common problems

After a restore, numbers show as disconnected and gateway keys are gone

The database was restored with a different config/config.php, so the app key does not match. Put the original config/config.php back.

The installer appears after a restore

config/config.php or storage/installed.lock is missing. Restore them; do not complete the installer.

"Something broke on our side" on every page after a restore

Open storage/logs/php-error.log and the newest storage/logs/app-…log. The usual causes are wrong database details in config/config.php or folders that are not writable.

Cookies on this site

We use the cookies needed to run the site and keep you signed in. With your OK we also remember choices you make here, such as the currency for prices. We don’t use advertising or tracking cookies. Cookie policy