Fix command
The fix command converts SurrealDB version 1.x data into a format that can be used in SurrealDB 2.x.
BEFORE YOU START
Command options
| Arguments | Description |
|---|---|
-e / --log
| Sets the logging level during the command |
Positional argument
| Arguments | Description |
|---|---|
file
| Sets 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.x storage, run the surreal fix command in a terminal with the path to the stored data.
Using environment variables
Important
When using the surreal fix command, you can also use environment variables to set the values for the command-line flags.
For more on the environment variables available for CLI commands or SurrealDB instances in general, see the environment variables page.
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.
The output of the above command: