dump-to-postgresql¶
Help command
> csm-data store dump-to-postgresql --help
Usage: csm-data store dump-to-postgresql [OPTIONS]
Running this command will dump your store to a given postgresql database
Tables names from the store will be prepended with table-prefix in target
database
The postgresql user must have USAGE granted on the schema for this script to
work due to the use of the command COPY FROM STDIN
You can simply give him that grant by running the command : GRANT USAGE ON
SCHEMA <schema> TO <username>
╭─ OPTIONS ────────────────────────────────────────────────────────────────────╮
│ * --store-folder PATH The folder containing the store files │
│ ENV: CSM_PARAMETERS_ABSOLUTE_PATH │
│ [required] │
│ --table-prefix PREFIX Prefix to add to the table name │
│ * --postgres-host TEXT Postgresql host URI │
│ ENV: POSTGRES_HOST_URI │
│ [required] │
│ --postgres-port INTEGER Postgresql database port │
│ ENV: POSTGRES_HOST_PORT │
│ * --postgres-db TEXT Postgresql database name │
│ ENV: POSTGRES_DB_NAME │
│ [required] │
│ * --postgres-schema TEXT Postgresql schema name │
│ ENV: POSTGRES_DB_SCHEMA │
│ [required] │
│ * --postgres-user TEXT Postgresql connection user name │
│ ENV: POSTGRES_USER_NAME │
│ [required] │
│ * --postgres-password TEXT Postgresql connection password │
│ ENV: POSTGRES_USER_PASSWORD │
│ [required] │
│ --replace/--append Append data on existing tables │
│ DEFAULT: replace │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯