dbImportStream

1. Help

Command: bin/dbImportStream --help

SYNOPSIS:
    Stream tar.gz file or gz file through mysql.

USAGE: dbImportStream [OPTIONS] [ARGUMENTS]
USAGE: dbImportStream [--profile|-p <profile>]
  [--tables <tablesSeparatedByComma>] [--reset] [--dump-kind|-k <dumpKind>]
  [--target-dsn|-t <targetDsn>] [--character-set|-c <characterSet>] [--help|-h]
  [--config] [--bash-framework-config <bash-framework-config>] [--verbose|-v]
  [-vv] [-vvv] [--log-level <log-level>] [--log-file <log-file>]
  [--display-level <display-level>] [--no-color] [--theme <theme>] [--version]
  [--quiet|-q]

ARGUMENTS:
  argDumpFile {single} (mandatory)    The file that will be streamed through mysql.
  argTargetDbName {single} (mandatory)    The name of the mysql target database.

PROFILE OPTIONS:
  --profile, -p <profile> {single}
    The name of the profile to use in order to
    include or exclude tables.
  --tables <tablesSeparatedByComma> {single}
    Import only table specified in the list.
    If aws mode, ignore profile option.


SOURCE OPTIONS:
  --reset {single}
    Reset the table before importing data using TRUNCATE TABLE or DROP TABLE
    before CREATE TABLE.
  --dump-kind, -k <dumpKind> {single}
    Kind of dump to import.

    Possible values: 
      - auto: Deduce dump kind from filename:     .sql             -> sql
            .tar             -> tar     .tar.gz or .tgz  -> tar.gz
            .gz              -> gz
      - sql: dump file is a .sql file.
      - tar: dump file is a .tar file containing multiple .sql files, one pe
        r table.
      - tar.gz: dump file is a .tar file gzipped containing multiple .sql fi
        les, one per table.
      - gz: dump file is a gz file containing a single .sql file.
      - tar.individual.sql.gz: dump file is a tar file containing multiple .
        sql.gz files, one per table.
    Default value: auto

TARGET OPTIONS:
  --target-dsn, -t <targetDsn> {single}
    Dsn to use for target database.
    Default value: default.local
  --character-set, -c <characterSet> {single}
    Change the character set used during database creation.

GLOBAL OPTIONS:
  --help, -h {single}
    Displays this command help
  --config {single}
    Displays configuration
  --bash-framework-config <bash-framework-config> {single}
    Use alternate bash framework configuration.
  --verbose, -v {single}
    Info level verbose mode (alias of --display-level INFO)
  -vv {single}
    Debug level verbose mode (alias of --display-level DEBUG)
  -vvv {single}
    Trace level verbose mode (alias of --display-level TRACE)
  --log-level <log-level> {single}
    Set log level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: OFF
  --log-file <log-file> {single}
    Set log file
    Default value: /logs/bash.log
  --display-level <display-level> {single}
    Set display level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: INFO
  --no-color {single}
    Produce monochrome output. alias of --theme noColor.
  --theme <theme> {single}
    Choose color theme - default-force means colors will be produced even if
    command is piped.
    Possible values: 
      - default
      - default-force
      - noColor
    Default value: default
  --version {single}
    Print version information and quit.
  --quiet, -q {single}
    Quiet mode, doesn't display any output.


DESCRIPTION:
  Data Source Name (DSN)
    Default dsn directory:
      /bash/conf/dsn

    User dsn directory:
      /home/www-data/.bash-tools/dsn
      Allows to override dsn defined in "Default dsn directory"

    List of available dsn:
      - default.local
      - default.remote
      - localhost-root

  Profiles
    Default profiles directory:
      /bash/conf/dbImportProfiles

    User profiles directory:
      /home/www-data/.bash-tools/dbImportProfiles
      Allows to override profiles defined in "Default profiles directory"

    List of available profiles:
      - all
      - default
      - none

  Changelog
    4.0 (2026-04-14)
      - add support for tar.gz and tar.individual.sql.gz dump files
    3.0
      - initial version

VERSION: 4.0

AUTHOR: [François Chastanet](https://github.com/fchastanet)

SOURCE FILE: https://github.com/fchastanet/bash-tools-framework/tree/master/src/_binaries/Database/dbImportStream/dbImportStream-binary.yaml

LICENSE: MIT License
Copyright (c) 2020-now François Chastanet
Or, if you want, you can alternatively use the GitHub discussion Q&A for feedback and questions.