Skip to content

Commands

This page describes the various subcommands supported by the lightningstream-enterprise command.

lightningstream-enterprise

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-enterprise [flags]

Options

  -c, --config string          Config file (default "lightningstream.yaml")
      --debug                  Enable debug logging
  -h, --help                   help for lightningstream-enterprise
  -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-enterprise docs

Generate markdown documentation for all commands to stdout

lightningstream-enterprise docs [flags]

Options

  -h, --help   help for docs

lightningstream-enterprise drop-shadow

Drop all shadow dbs and other sync metadata. This can potentially cause data loss.

lightningstream-enterprise drop-shadow [flags]

Options

  -h, --help   help for drop-shadow

lightningstream-enterprise dump

Dump LMDB contents

lightningstream-enterprise dump [flags]

Options

  -h, --help          help for dump
  -H, --hide          Hide private lightningstream databases
  -n, --name string   Only dump given database name

lightningstream-enterprise experimental

Experimental commands, may disappear or change in any future version

lightningstream-enterprise experimental [flags]

Options

  -h, --help   help for experimental

lightningstream-enterprise 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-enterprise experimental help [command] [flags]

Options

  -h, --help   help for help

lightningstream-enterprise 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-enterprise 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-enterprise 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-enterprise 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-enterprise help

Help about any command

Synopsis

Help provides help for any command in the application. Simply type lightningstream-enterprise help [path to command] for full details.

lightningstream-enterprise help [command] [flags]

Options

  -h, --help   help for help

lightningstream-enterprise receive

Like sync, but never write snapshots

lightningstream-enterprise 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-enterprise snapshots

Remote snapshot operations (list, dump, remove, etc)

lightningstream-enterprise snapshots [flags]

Options

  -h, --help   help for snapshots

lightningstream-enterprise snapshots dump

Dump snapshot contents for debugging

lightningstream-enterprise 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-enterprise snapshots get

Download a snapshot

lightningstream-enterprise snapshots get [flags]

Options

  -h, --help            help for get
  -o, --output string   Output filename, if not the same as the remote name

lightningstream-enterprise 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-enterprise snapshots help [command] [flags]

Options

  -h, --help   help for help

lightningstream-enterprise snapshots list

List snapshots

lightningstream-enterprise 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-enterprise snapshots put

Upload a snapshot

lightningstream-enterprise 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-enterprise snapshots remove

Remove snapshot

lightningstream-enterprise snapshots remove [flags]

Options

  -h, --help   help for remove

lightningstream-enterprise stats

Print LMDB stats

lightningstream-enterprise stats [flags]

Options

  -h, --help   help for stats

lightningstream-enterprise sync

Continuous bidirectional syncing

lightningstream-enterprise sync [flags]

Options

  -h, --help                          help for sync
      --only-db stringArray           Only sync this named db (can be repeated)
      --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-enterprise version

Print the version number

lightningstream-enterprise version [flags]

Options

  -h, --help   help for version