pg_dump
to PostgreSQL for Serverless through the psql
command.psql
command to easily migrate the data to PostgreSQL for Serverless.
The data migration is mainly divided into two steps:pg_dump
command to create dump data.pg_dump -U username -h hostname -p port -O databasename -f filename
-O
parameter.Parameter | Description |
username | Local database username |
hostname | Local database host name |
port | Local database port number |
databasename | Name of the local database to be backed up |
filename | Name of the backup file to be generated, such as mydump.sql |
psql -U username -h hostname -d desintationdb -p port -f dumpfilename
Parameter | Description |
username | PostgreSQL for Serverless database username |
hostname | PostgreSQL for Serverless database address |
desintationdb | PostgreSQL for Serverless database name |
port | PostgreSQL for Serverless database port number |
dumpfilename | Backup file name, such as mydump.sql |
Was this page helpful?