All Products
Search
Document Center

PolarDB:PolarDB-Tools

Last Updated:Jun 03, 2026

PolarDB-Tools is a suite of PolarDB client tools. Learn what tools are included and how to install them.

PolarTools is a suite of PolarDB client tools for all versions of Alibaba Cloud Linux, Rocky Linux, CentOS Stream, and CentOS. The following table lists the included tools.

Note

We recommend that you use PolarTools to manage clusters.

PolarTools (psql, pg_dump, etc.) differ from the PostgreSQL Community versions and are adapted to . Using PostgreSQL Community tools may cause unexpected exceptions or incomplete backup and restore operations.

Tool

Description

Usage

psql

Connects to PolarDB for PostgreSQL (Compatible with Oracle) clusters.

psql in the PostgreSQL documentation.

polarplus

Connects to PolarDB databases with Oracle syntax compatibility.

For more information, see PolarPlus.

pg_dump

Performs logical backup of a single database in a cluster.

For more information, see pg_dump.

pg_dumpall

Performs logical backup of all databases in a cluster.

pg_dumpall in the PostgreSQL documentation.

pg_basebackup

Performs physical backup of all data in a cluster.

pg_basebackup in the PostgreSQL documentation.

pg_restore

Restores data from pg_dump and pg_dumpall backups.

pg_restore in the PostgreSQL documentation.

Download and install PolarTools

  1. Download and decompress PolarDB-Tools.tar.gz. The package extracts to the following directory structure:

    polardb-tools
    ├── bin
    │   ├── pg_basebackup
    │   ├── pg_dump
    │   ├── pg_dumpall
    │   ├── pg_restore
    │   └── psql
    ├── etc
    │   └── sysconfig
    ├── help
    ├── lib
    ├── login.sql
    ├── polarplus -> ./polarplus.sh
    ├── polarplus.jar
    └── polarplus.sh
  2. The bin directory contains all tool executables except polarplus. Configure polarplus before use. For more information, see PolarPlus.

    Add the bin directory to your PATH by editing a global (/etc/profile) or personal (/root/.bash_profile, /root/.bashrc, $HOME/.bash_profile, or $HOME/.bashrc) configuration file.

    1. Open the configuration file. This example uses $HOME/.bashrc:

      vim $HOME/.bashrc
    2. Append the following line. Replace {pwd} with the absolute path to the polardb-tools directory.

      export PATH=$PATH:/{pwd}/polardb-tools/bin
    3. Apply the changes.

      source $HOME/.bashrc
Note

If you see an error like the following, install the missing dynamic libraries with yum install.

psql: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory