Move your data in or out
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.
PostgreSQL
Section titled “PostgreSQL”# copy out of the old databasepg_dump --format=custom --no-owner "postgres://USER:PASSWORD@OLD-HOST:5432/DBNAME" > dump.pgc
# load into your Phluit databasePGPASSWORD="$DB_PASSWORD" pg_restore --no-owner \ --dbname "host=HOST port=PORT user=dbadmin dbname=defaultdb sslmode=verify-ca sslrootcert=ca-certificate.crt" dump.pgc# copy out of the old databasemysqldump --single-transaction --routines --triggers -h OLD-HOST -u USER -p DBNAME > dump.sql
# load into your Phluit databaseMYSQL_PWD="$DB_PASSWORD" mysql -h HOST -P PORT -u dbadmin --ssl-mode=VERIFY_CA --ssl-ca=ca-certificate.crt defaultdb < dump.sqlEvery MySQL table needs a primary key: add one to tables without it before you load them.
Taking a copy out
Section titled “Taking a copy out”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?
Thank you. If something is missing, tell us.
