sqadm pump(1)

NAME

sqadm pump - Squore data import

SYNOPSIS

sqadm pump [-S dir] [-W dir] [--clob-size n] [--rows n] [--section name] [--jdbc-url url] [--jdbc-user user] [source [user]]

DESCRIPTION

This command allows to import the content of a remote database into the database of the current Squore server installation.

More specifically, it may:

  • When source is a URL starting with "jdbc:", copy content from a remote Squore database (Oracle or PostgreSQL targeted by the "jdbc:" URL) into the PostgreSQL database of the Squore server.

  • When source is a path to a PostgreSQL dump file (binary or plain text format, optionally gzipped), restore the file content into the Oracle database of the Squore server. If no source is supplied, a PostgreSQL binary dump file is read from the standard input.

The sqadm pump command shall be executed on a stopped Squore server, but a running database. If a remote database is used, the remote Squore server shall be stopped as well.

OPTIONS

-S, --sql-dir dir

Directory with SQL scripts to create schema.

-W, --working-dir dir

Directory to store temporary (and large) files. The current working directory is used if not supplied.

This option is used when importing data into an Oracle database only.

--clob-size n

Buffer size for CLOB columns, in bytes.

The default value is 1048576 bytes (1 MB). The sqlldr utility will fail if a value larger than this limit is found in the data file.

This option is used when importing data into an Oracle database only.

--rows n

Number of rows to process at once.

Large tables should be split with the --rows option. When not supplied, a table is processed in one block and requires a lot of memory (sqlldr issue).

This option is used when importing data into an Oracle database only.

--section name

Only create the named section (pre-data, data, post-data or none).

This option can be specified more than once to select multiple sections. The default is to restore all sections.

--jdbc-url url

Use alternate database connection, with URL of the form jdbc:subprotocol:subname.

--jdbc-user user

Use alternate database username.

source

A database URL or a PostgreSQL dump file (in binary or plain text format), specifying data to import. If not supplied, a PostgreSQL binary dump file is read from the standard input.

user

A database username, used to connect to the remote database (defaults to squore).

NOTES

When restoring data into an Oracle database, please note that:

The sqadm pump command generates input files suitable for the sqlldr Oracle tool, which is used internally. This tool shall be properly accessible from the PATH environment variable.

Temporary data files are generated in the current working directory (unless overridden by the --working-dir option), so make sure there is enough space on the disk partition. Table data is processed by chunks, whose sizes are controlled by the --rows option (unlimited by default), with impacts on both disk and memory usage.

EXAMPLES

To import a remote Oracle database into a local PostgreSQL database:

$ sqadm pump jdbc:oracle:thin:@//orahost:1521/oraservice SQUORE