Commands¶
This page describes the various subcommands supported by the lightningstream
command.
lightningstream¶
This tool syncs one or more LMDB databases with an S3 bucket
Synopsis¶
This tool syncs one or more LMDB databases with an S3 bucket
lightningstream [flags]
Options¶
-c, --config string Config file (default "lightningstream.yaml")
--debug Enable debug logging
-h, --help help for lightningstream
-i, --instance string Instance name, defaults to hostname. MUST be unique for each instance
--log-config Log the evaluated configuration on startup
--log-format string Log format (default: human; options: human, logfmt, json)
--log-level string Log level (default: info; options: debug, info, warning, error, fatal)
--log-timestamp string Log timestamp (default: short; options: short, disable, full)
--minimum-pid int Try to fork processes until we reach a minimum PID to avoid LMDB lock PID clashes when running in a container. The maximum allowed value is 200
--timeout duration Timeout for command execution (exit code 75)
lightningstream docs¶
Generate markdown documentation for all commands to stdout
lightningstream docs [flags]
Options¶
-h, --help help for docs
lightningstream drop-shadow¶
Drop all shadow dbs and other sync metadata. This can potentially cause data loss.
lightningstream drop-shadow [flags]
Options¶
-h, --help help for drop-shadow
lightningstream dump¶
Dump LMDB contents
lightningstream dump [flags]
Options¶
-h, --help help for dump
-H, --hide Hide private lightningstream databases
-n, --name string Only dump given database name
lightningstream experimental¶
Experimental commands, may disappear or change in any future version
lightningstream experimental [flags]
Options¶
-h, --help help for experimental
lightningstream experimental help¶
Help about any command
Synopsis¶
Help provides help for any command in the application. Simply type experimental help [path to command] for full details.
lightningstream experimental help [command] [flags]
Options¶
-h, --help help for help
lightningstream experimental migrate-timestamps¶
Migrate timestamps from one DBI to another DBI
Synopsis¶
Migrate timestamps from one DBI to a target DBI by key.
Requirements:
- The keys must match between source and destination without any transformation.
- The DBIs must not use special DBI flags.
- The destination DBI must use the new 24+ byte native headers.
- The source DBI must use the new header, or the old (v0.2.0) 8 byte timestamp-only headers.
This command can be used for both native DBIs, and for shadow DBIs. If the target timestamp is higher than the source, it will not be updated.
The actual values are not compared, it blindly copies the timestamps. This is only useful during a migration where no new data is written.
This command will abort the transaction and exit with an error if any value shorter than expected is encountered.
Example to migrate shard records when moving from PowerDNS Auth 4.7 to 4.8:
... migrate-timestamps --add-delete-entries --database shard --src-dbi _sync_shadow_records --dst-dbi records_v5
lightningstream experimental migrate-timestamps [flags]
Options¶
--add-delete-entries Create 24-byte deletion headers for entries marked as deleted in the source database.
-d, --database string Named database to operate on
--dst-dbi string Destination DBI
-h, --help help for migrate-timestamps
--ignore-src-dbi-not-present Do not exit with an error if the source DBI does not exist, ignore it.
--src-dbi string Source DBI
lightningstream experimental pdns-v5-fix-duplicate-domains¶
Fix duplicate domain entries for PowerDNS Auth 4.8 with schema version 5
Synopsis¶
The PowerDNS Auth 4.8 schema version 5 makes it possible to create duplicate domain entries on different instances, which can cause an error in early version of Auth. This command allows you to remove those duplicate entries.
lightningstream experimental pdns-v5-fix-duplicate-domains [flags]
Options¶
--dangerous-do-rename Automatically rename the newer duplicate domain name to fix
-d, --database string Named database to operate on (must be the main database for pdns auth)
-h, --help help for pdns-v5-fix-duplicate-domains
lightningstream help¶
Help about any command
Synopsis¶
Help provides help for any command in the application. Simply type lightningstream help [path to command] for full details.
lightningstream help [command] [flags]
Options¶
-h, --help help for help
lightningstream receive¶
Like sync, but never write snapshots
lightningstream receive [flags]
Options¶
-h, --help help for receive
--only-once Only do a single run and exit
--wait-for-marker-file string Marker file to wait for in storage before starting syncers
lightningstream snapshots¶
Remote snapshot operations (list, dump, remove, etc)
lightningstream snapshots [flags]
Options¶
-h, --help help for snapshots
lightningstream snapshots dump¶
Dump snapshot contents for debugging
lightningstream snapshots dump [flags]
Options¶
-d, --dbi string Only output DBI with this exact name
-f, --format string Output format, one of: 'debug' (default), 'text' (same) (default "debug")
-h, --help help for dump
-l, --local Dump a local file instead of a remote snapshot
lightningstream snapshots get¶
Download a snapshot
lightningstream snapshots get [flags]
Options¶
-h, --help help for get
-o, --output string Output filename, if not the same as the remote name
lightningstream snapshots help¶
Help about any command
Synopsis¶
Help provides help for any command in the application. Simply type snapshots help [path to command] for full details.
lightningstream snapshots help [command] [flags]
Options¶
-h, --help help for help
lightningstream snapshots list¶
List snapshots
lightningstream snapshots list [flags]
Options¶
-h, --help help for list
-l, --long Add extra information, like size
-p, --prefix string Prefix filter
-t, --time Sort by snapshot time
lightningstream snapshots put¶
Upload a snapshot
lightningstream snapshots put [flags]
Options¶
--force Force the use of an invalid snapshot name
-h, --help help for put
-n, --name string Name to store the snapshot as, if different from the local name
lightningstream snapshots remove¶
Remove snapshot
lightningstream snapshots remove [flags]
Options¶
-h, --help help for remove
lightningstream stats¶
Print LMDB stats
lightningstream stats [flags]
Options¶
-h, --help help for stats
lightningstream sync¶
Continuous bidirectional syncing
lightningstream sync [flags]
Options¶
-h, --help help for sync
--only-once Only do a single run and exit
--wait-for-marker-file string Marker file to wait for in storage before starting syncers
lightningstream version¶
Print the version number
lightningstream version [flags]
Options¶
-h, --help help for version