StarDump CLI
Introduction
StarDump CLI is a command-line interface that unloads and reloads database data. It's found in C:\Program Files\Starcounter\StarDump
.
The data is unloaded into sqlite3
files that can be examined or modified with DB Browser for SQLite.
All examples on this page assume that you have C:\Program Files\Starcounter\StarDump
as an environment variable.
The general format for the StarDump CLI looks like this:
There are two commands, unload
and reload
, and both of them have their own options.
Unload Database
The unload
command takes a Starcounter database and creates a sqlite3
file with the data. Running stardump unload
without any options will unload the default
database to %TEMP%\stardump-<database>-<date>.sqlite3
. To specify the unload further, these options can be used:
Name | Type | Default value | Description |
|
|
| Database name to unload |
|
|
| Output file path with file name |
|
|
| Number of rows in a single |
|
|
| Column prefixes to skip |
|
| Table prefixes to skip | |
|
| Table names to skip | |
|
| Table names to unload | |
|
|
| Verbose mode, higher number prints more [Error:0, Warning:1, Notice:2, Info:3, Debug:4] |
The option values are case sensitive. Also, unloadtables
disables skiptableprefixes
and unloadtables
if they are used together. string[]
values should be space or comma separated.
Example of unload:
The targeted database can either be running or stopped when it's unloaded. If the database is running, StarDump creates a snapshot of the database when the unload starts so that no changes made during the unload are included.
You can use stardump unload --help
to get more information about the available options.
Reload Database
The reload
command takes a sqlite3
file and reloads it into a Starcounter database. The basic structure of a reload looks like this:
The --database
and --file
option always have to be specified.
These are all options for the reload
command:
Name | Type | Description |
|
| Database name to reload into |
|
| Path to |
| none | Force reload even if the database already contains data. The user has to take care of object ID uniqueness. |
|
|
|
| none | Sets the |
| none | If flag is set, then schema creation and validation will be skipped. In |
|
| Verbose mode, higher number prints more [Error:0, Warning:1, Notice:2, Info:3, Debug:4] |
None of these are have a default value except for --verbose
which is set to 2
.
If --forcereload
is not used, the database should be dropped and created prior to reload to ensure that the database is empty:
You can use stardump reload--help
to get more information about the available options.
Last updated