pgloader with the /go/pgloader Command

/go/pgloader installs pgloader, a command-line tool that copies a MySQL or MariaDB database into PostgreSQL, converting its tables, data types, and rows along the way. The command installs the package only. It does not convert anything: once it finishes, you run pgloader yourself (see Examples). Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Install pgloader
/go/pgloader

Options

None.

Examples

# Install pgloader
/go/pgloader

# Confirm that it is installed
pgloader --version

# Convert a MySQL/MariaDB database into an existing PostgreSQL database
pgloader mysql://dbuser:dbpass@localhost/olddb postgresql://pguser:pgpass@localhost/newdb

[!WARNING]
Passwords typed into a connection address can show up in the process list and in your shell history. Special characters in a password, such as @, :, or /, must be URL-encoded (for example @ becomes %40). For repeated conversions, put the settings in a pgloader command file instead and run pgloader <file>.

Output

The command prints no messages of its own. You see only the package manager’s output.

Outcome What you get
Supported operating system The installer output for the PostgreSQL repository (RHEL family only) and for pgloader.
Unsupported operating system Nothing. No error is printed and nothing is installed.

The command does not check that the install worked. Run pgloader --version afterward to confirm.

Log

Each run appends one line to /var/log/go/pgloader.log:

[Nov 21 12:00:00]# pgloader

See the full reference at /go/pgloader and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *