We mainly discuss about how to migrate local self-created PostgreSQL to JCS for PostgreSQL of JD Cloud. Instead of performing daily operation and maintenance, monitoring, backup and other operations by yourself in the case of using self-created local PostgreSQL, you can only concern use by using JCS for PostgreSQL of JD Cloud.
pg_dump -U User Name -h Database Address -p Database Port Database Name -f /Path/Exported File Name.sql Parameter Description User name: User name of self-built database. Database address: Refer to database host name, and localhost can be used for login of local database host. Database port: Refer to the port number of a self-built database. Database name: Fill in a database name to be exported.
psql -U User Name -h Cloud Database Domain -d Cloud Database Name -p Cloud Database Port -f /Path of Virtual Machines/Name of Exported File.sql Parameter Description User name: User name in actions of step 2. Cloud Database Domain: The domain of JCS for PostgreSQL can be viewed on the Instance Details Page. Cloud Database Name: Refer to the name of the target database where data are imported into. Cloud Database Port: The port number of JCS for PostgreSQL can be viewed on the Instance Details Page.