Data backup

Back up and restore the database from the web admin console to keep your data safe.

In the left menu of the admin console, click "Database maintenance". The page has three tabs at the top: "Backup", "Restore" and "Migrate".

Enter maintenance mode first

Before backing up or restoring, enter maintenance mode to disconnect all online clients and avoid data conflicts during the operation. If maintenance mode is not on, the system shows a reminder, and you can choose to continue or enter maintenance mode first.

1. Database backup

Open the "Backup" tab and click "Back up now" in the upper right corner. A live progress bar shows the table being processed, the table progress and the row count.

What is backed up

A backup exports all table data in the database, including the organization structure, user accounts, groups and chat history indexes.

Info

The backup does not include chat files or cloud drive files. For a full backup, copy these two directories manually: imdata/data/ (files, images, voice messages, etc. sent and received in chats) and imdata/cloud/ (cloud drive files).

Managing backup files

Backup files are saved in the backup/ directory on the server. In the "Backup history" list you can:

ActionDescription
View detailsShows the backup time, file size, server version, source database type, run mode, number of tables and total rows
DownloadSaves the backup file to your computer
DeleteDeletes the backup file from the server (cannot be undone)

2. Database restore

Danger

Restoring erases all data in the current database and replaces it with the data in the backup. This cannot be undone. Make sure you are in maintenance mode with no users online, and that you have backed up the current data if you need to keep it.

Option 1: Restore from an existing backup

Open the "Restore" tab. The system lists all backup files in the backup/ directory. Select the backup you want, click "Restore" and confirm. The restore starts and shows live progress.

Option 2: Upload a backup file and restore

If the backup file is on your computer or another server, go to the "Upload backup file and restore" section at the bottom of the restore page, choose a backup file in .zip or .db.gz format, and click "Upload and restore".

After restoring

1. When the restore is complete, restart the HelpChat Server service.

2. To restore chat files and cloud drive files, manually copy the previously backed up imdata/data/ and imdata/cloud/ directories over the matching locations on the server.

3. Backup recommendations

Back up regularly: back up the database at least once a week, and once before and once after any major change.

Keep copies off-site: use "Download" to save backup files to your computer or other storage, so the data is not all lost if the server fails.

Full backups: in addition to database backups, regularly copy the whole imdata/ directory (including data, cloud and the database files) so that chat files and cloud drive files are complete.

Tip

To migrate data to a different type of database (for example from SQLite to MySQL), see Server migration.