Skip to content
phluit.comGo to portal

Move your data in or out

Last verified 30 Nov 2026

Copy a database from another host into Phluit, or take a copy out, with pg_dump and pg_restore or mysqldump.

Run these commands from a computer or server that’s on the database’s trusted sources, with the CA certificate from the Connect tab next to them.

Terminal window
# copy out of the old database
pg_dump --format=custom --no-owner "postgres://USER:PASSWORD@OLD-HOST:5432/DBNAME" > dump.pgc
# load into your Phluit database
PGPASSWORD="$DB_PASSWORD" pg_restore --no-owner \
--dbname "host=HOST port=PORT user=dbadmin dbname=defaultdb sslmode=verify-ca sslrootcert=ca-certificate.crt" dump.pgc
Terminal window
# copy out of the old database
mysqldump --single-transaction --routines --triggers -h OLD-HOST -u USER -p DBNAME > dump.sql
# load into your Phluit database
MYSQL_PWD="$DB_PASSWORD" mysql -h HOST -P PORT -u dbadmin --ssl-mode=VERIFY_CA --ssl-ca=ca-certificate.crt defaultdb < dump.sql

Every MySQL table needs a primary key: add one to tables without it before you load them.

The same tools work the other way round: run pg_dump or mysqldump against your Phluit database to keep a copy of your own.

Need a hand with a move? Open a ticket.

Was this helpful?