Skip to main content

Restore Backup Error: Unknown Command ‘\-‘

While restoring a database backup, you may encounter the following error:

Restoring Database file...
ERROR at line 7: Unknown command '\-'.
Cause

This error typically occurs when a backup created using a newer version of MariaDB is restored on an older MariaDB version. The older database version cannot interpret certain syntax used in the backup file.

Resolution

This issue has already been resolved in the latest versions of the Frappe Framework. To fix the error:

  1. Update your site to the latest supported version of Frappe Framework.
  2. Ensure your MariaDB version is compatible with the backup you are restoring.
  3. Retry the backup restoration after the update completes.
Best Practice

Always restore backups using a Frappe and MariaDB version that is the same as, or newer than, the environment where the backup was created. This helps avoid compatibility issues during restoration.

Rating: 0 / 5 (0 votes)