Let's get some help!

How do I import data into a Scaleway Database?


To import data into your Scaleway Database for PostgreSQL, export your data using the pg_dump command in a first step:

pg_dump -h OLD_DB_IP -p OLD_DB_PORT -U OLD_DB_USERNAME -F c -b -v -f "/usr/local/backup/database.backup" DATABASE_NAME

Once the data is exported, import the database using the pg_restore command:

pg_restore -h INSTANCE_IP -p INSTANCE_PORT -U USERNAME -d DATABASE_NAME -v "/usr/local/backup/database.backup"

The different parameters used in the commands represent the following values:

  • -h (--host): IP address of the host
  • -p (--port): Port number of the host
  • -U (--username): PostgreSQL user
  • -F (--format): Format
  • cc just after a -F means that the format is the binary format specific to postgreSQL
  • -b (--blobs): Specifies the binary string type
  • -v (--verbose)
  • -f (--file): Specifies the file name


If you want to import your existing database into a Scaleway Database for MySQL, start by exporting your data using the command mysqldump :

mysqldump -u username -p old_database > backup.sql

Then import the backup into your Scaleway Database for MySQL:

mysql -u username -p new_database < backup.sql

Was this helpful?

Great, thank you!
Tell us what you are looking for?
Contact us