Data migration to another instance
To safely migrate data from the Allure TestOps instance to another Allure TestOps instance, you need to:
You can follow these steps not only for the data migration but also for backup and recovery. The backup processes are described in detail in the official PostgreSQL documentation.
This operation will overwrite the data in the target instance with the contents of the dump.
Creating database dump
The pg_dump utility version must match the version of the target database.
pg_dump --file=[FILE-NAME].dump --host=[DB-HOST] --port=[DB-PORT] \
--username=[USERNAME] --dbname=[DB-NAME] \
--compress=9 --format=c \
--schema=public --verbose --blobs --no-owner \
--no-privileges --no-comments -W
where:
FILE-NAME
— name of the output file;DB-HOST
— database host;DB-PORT
— PostgreSQL port;USERNAME
— database username;DB-NAME
— database name.
Restoring database dump
The pg_restore utility version must match the version of the pg_dump utility.
Create an empty database into which you plan to load the dump. To do this, follow all the steps described in the Creating the database instruction.
Restore the previously made dump:
pg_restore --host [DB-HOST] --port [DB-PORT] --username [USERNAME] \ --dbname [DB-NAME] -W --no-owner --no-acl --verbose \ file_name.dump
where:
DB-HOST
— database host;DB-PORT
— PostgreSQL port;USERNAME
— database username;DB-NAME
— database name.
© Qameta Software Inc. All rights reserved.