Moving from Allure TestOps Server to Allure TestOps Cloud
Migration is a multi-step process that requires a planned downtime window. The steps below cover creating the Cloud instance, reducing data to fit within Cloud limits, and handing the archives to the support team for import.
Steps overview
- Create an Allure TestOps Cloud instance.
- Open a support ticket to initiate migration.
- Delete test artifacts to bring storage below the 60 GB Cloud limit.
- Create encrypted data archives and share them with the support team.
Create a Cloud instance
Go to Start Free Trial and fill out the form. Once the instance is ready, add payment information under Administration → License → Manage subscription, so the instance does not switch to read-only mode when the trial ends. See Manage subscription.
Open a support ticket
Create a Support ticket at help.qameta.io to initiate the migration. The ticket is used for all communication throughout the process.
Use this subject line:
Migration to SaaS <instance_name>.testops.cloud for <your_company_name>
where:
<instance_name>is the domain name used when registering the Cloud instance<your_company_name>is your company name
Include the current Allure TestOps Server version and any relevant details in the message body.
Estimate the data volume
To plan the migration, the support team needs to know how much data will be moved. Run the following queries against the testops database and attach the results to the support ticket.
Size of the database and its largest tables:
SELECT pg_size_pretty(pg_database_size(current_database())) AS database_size;
SELECT relname AS table_name,
n_live_tup AS row_count,
pg_size_pretty(pg_total_relation_size(relid)) AS total_size
FROM pg_stat_user_tables
ORDER BY pg_total_relation_size(relid) DESC;
Number of test results per day for the last two weeks:
SELECT to_char(to_timestamp(created_date / 1000), 'YYYY-MM-DD') AS day,
count(*) AS test_results
FROM test_result
WHERE created_date >= extract(epoch FROM now() - interval '14 days') * 1000
GROUP BY day
ORDER BY day;
Reduce storage to under 60 GB
If your Server instance data exceeds 60 GB, delete artifacts before creating the archive. The largest portion of data is typically test artifacts, which can be removed using cleanup policies.
To keep only artifacts from the last 48 hours:
Go to Administration → Cleanup policies.
Click + Create and create rules for all targets and result statuses (15 rules total), with a clean delay of 48 hours.
Cleanup rules
Target Test result status Clean delay Attachment Failed 48 Attachment Broken 48 Attachment Passed 48 Attachment Skipped 48 Attachment Unknown 48 Scenario Failed 48 Scenario Broken 48 Scenario Passed 48 Scenario Skipped 48 Scenario Unknown 48 Fixture Failed 48 Fixture Broken 48 Fixture Passed 48 Fixture Skipped 48 Fixture Unknown 48
Launches also take space in the database, and a large database makes the dump and the import longer. To delete launches you no longer need, for example launches older than 180 days, use the allure-testops-utils tool for each project.
If cleanup has never run on the instance, the first run puts a heavy load on the artifact storage. Start it during off-hours.
To trigger cleanup immediately without waiting for the next scheduled run, use the API:
- Go to
<testops>/swagger-ui.html, where<testops>is the base URL of your Server instance. - Find the cleanup-controller category.
- Run /cleanup/scheduler/cleaner_schema_global → Try it out. Wait for the request to finish.
- Run /cleanup/scheduler/cleaner_schema_project → Try it out. Wait for the request to finish.
- Run /cleanup/scheduler/blob_remove_task → Try it out. Wait for the request to finish.
Large artifact volumes may produce error responses from these endpoints. The errors do not affect the cleanup process and can be ignored.
Monitor cleanup progress with this query against the testops database:
SELECT COUNT(*) FROM blob_remove_task;
Proceed to the next step when the query returns 0.
Cloud instances come with a predefined set of cleanup rules. See Default global cleanup rules.
Create and send data archives
These instructions apply to Allure TestOps version 5.x or higher only.
Use the most recent release of pg_dump version 16.
Stop all traffic to the Server instance by stopping the Allure TestOps service, the load balancer, or the ingress routes.
Create a database dump:
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 -Wwhere:
FILE-NAME: output file name;DB-HOST: database host;DB-PORT: PostgreSQL port;USERNAME: database username;DB-NAME: database name.
Download all files from the test artifacts storage using S3cmd or a similar tool.
Pack the database dump and artifact files into one or more archives. Encrypt each archive with a strong password. If the artifacts take more than 4 GB, create a multi-volume archive, so an interrupted transfer does not require uploading everything again.
Upload the archives to a location accessible by the support team.
Share the archive links and passwords in the support ticket created earlier.
After the support team receives the archives, data import takes up to 24 hours. You will be notified via the same ticket once the Cloud instance is ready.
After the import, the Cloud instance is upgraded to the latest Allure TestOps release. For large artifact volumes, the upload and download can take longer than 24 hours, so plan the downtime accordingly.