SurrealDB Docs Logo

Enter a search query

Back to home
SurrealDB

SurrealDB

Fix command

The fix command converts SurrealDB version 1.x data into a format that can be used in SurrealDB 2.0

BEFORE YOU START

Make sure you’ve installed SurrealDB — it should only take a second!

Command options

ArgumentsDescription

-e / —log

optional

Sets the logging level during the command

Positional argument

ArgumentsDescription
file

Sets the the path to the existing data to convert to 2.x storage format

Example usage

To perform a fix from SurrealDB 1.x to 2.0 storage, run the surreal fix command in a terminal with the path to the stored data.

surreal fix surrealkv://mydatabase.db

surreal fix rocksdb:somedatabase

Command help

To see the help information and usage instructions, in a terminal run the surreal fix --help command without any further arguments. This command gives general information on the arguments, inputs, and additional options for the export command.

surreal fix --help

The output of the above command :

Fix database storage issues

Usage: surreal fix [OPTIONS] [PATH]

Arguments:
  [PATH]  Database path used for storing data [env: SURREAL_PATH=] [default: memory]

Options:
  -l, --log <LOG>  The logging level for the database server [env: SURREAL_LOG=] [default: info] [possible values: none, full, error, warn, info, debug, trace]
  -h, --help       Print help

On this page

© SurrealDB GitHub Discord Community Cloud Features Releases Install