Backup command
The Backup command backs up data into or from an exisiting database.
Make sure you’ve installed SurrealDB — it should only take a second!
Command options
Argument | Description |
---|---|
-c / --help
|
Prints help information and instructions on the command-line tool and its arguments |
-u / --user
|
Database authentication username to use when connecting [default: root] |
-p / --pass
|
Database authentication password to use when connecting [default: root] |
Positional argument
Argument | Description |
---|---|
from
|
Path to the remote database or file from which to export |
into
|
Path to the remote database or file into which to import |
Example usage
To perform a SurrealQL database Backup, in a terminal run the surreal backup
command with the required arguments.
user@localhost % surreal backup [OPTIONS] <from> <into>
Command help
To see the help information and usage instructions, in a terminal run the surreal backup --help
command without any further arguments. This command gives general information on the arguments, inputs, and additional options for the backup
command.
user@localhost % surreal backup --help
Backup data to or from an existing database
USAGE:
surreal backup [OPTIONS] <from> <into>
ARGS:
<from> Path to the remote database or file from which to export
<into> Path to the remote database or file into which to import
OPTIONS:
-h, --help Print help information
-p, --pass <pass> Database authentication password to use when connecting [default: root]
-u, --user <user> Database authentication username to use when connecting [default: root]