We use cookies for statistical and audience measurement purposes.
Learn more
Manage your preferences


Let's get some help!

How do I import data into a Scaleway Database?

To import data into your Scaleway Database, 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

Was this helpful?

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