% SPLINTER-STATE-MIGRATE(1) Cargill, Incorporated | Splinter Commands
splinter-state-migrate — Move scabbard state to or from LMDB
| command [FLAGS] [OPTIONS]
Move scabbard state to or from LMDB, deleting from the input database. This allows for reconfiguring Scabbard instances to switch between using LMDB files for merkle state or using SQL based databases. The SQL URI provided should be for the SQLite or PostgreSQL database that contains the rest of Splinter state.
The command will prompt the user to make sure they wish to run the command as once the merkle state has been successfully moved to the out target for a service, the input data will be removed.
This command should not be run when the associated splinterd is currently running.
- Check that the in and out databases are available and that the in database has a commit hash. The command will not attempt to move the state
- Always attempt to move state, regardless of if there is existing data in the out database
- Prints help information
- Prints version information
- Do not display output
- Increases verbosity (the opposite of -q). Specify multiple times for more output
- Do not prompt for confirmation
- Database URI that currently contains the scabbard state. If state is in
individual LMDB files, provide
- The database URI the scabbard state should end up in. If state should be put
into individual LMDB files, provide
- Specifies the storage directory. (Defaults to
The following example moves the LMDB files into the SQLite database for the splinter daemon:
$ splinter state migrate --in lmdb --out /var/lib/splinter/splinter_state.db Attempting to migrate scabbard state from lmdb to /var/lib/splinter/splinter_state.db Warning: This will purge the data from `--in` and only the current state root is stored, the rest are purged. Are you sure you wish to migrate scabbard state? [y/N] y Migrating state data for GkV3z-S1YpG::b000 Scabbard state successfully migrated
To skip responding to the prompt, add
$ splinter state migrate \ --in lmdb \ --out /var/lib/splinter/splinter_state.db \ --yes Attempting to migrate scabbard state from lmdb to /var/lib/splinter/splinter_state.db Migrating state data for GkV3z-S1YpG::b000 Scabbard state successfully migrated
If the LMDB files are not in the configured state directory provide
$ splinter state migrate \ --in lmdb \ --out /var/lib/splinter/splinter_state.db \ --state-dir home/node2/data/splinter_state.db \ -y Attempting to migrate scabbard state from lmdb to /var/lib/splinter/splinter_state.db Migrating state data for GkV3z-S1YpG::b000 Scabbard state successfully migrated
The following environment variables affect the execution of the command.
Defines the default state directory for YAML state and SQLite. This is overridden by the
Defines the default splinter home directory, from which the state directory is derived as
$SPLINTER_HOME/data. This environment variable is not used if either the
SPLINTER_STATE_DIRenvironment variable or the
--state-dirflag is set.
| Splinter documentation: https://www.splinter.dev/docs/0.6/