Backup command
Backup command
The Backup command backs up data into or from an existing database.
 BEFORE YOU START Make sure you’ve installed SurrealDB — it should only take a second! 
Command options
| Arguments | Description | |
|---|---|---|
| -c / --help | Prints help information and instructions on the command-line tool and its arguments | |
| -u / --user | Sets master username for the database | |
| -p / --pass | Sets master password for the database | |
Positional argument
| Arguments | 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.
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.
surreal backup --help
The output of the above command :
Backup data to or from an existing database
USAGE:
surreal backup [OPTIONS] <from> <into>
ARGS:
 <file> Path to the sql file 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]