Menu

Backup and Restore

This article provides the latest instructions to backup and restore Manager and Sessions data. If your current version of Manager is 7.7.x or older, please see the older instructions instead: Legacy Backup and Restore.

Docker

Docker Backup

NOTE: Please shut down all Docker hosts where qTest Manager and qTest Sessions are deployed before proceeding. If you deploy qTest Manager on multiple Docker hosts, please repeat the following steps on each host.

  1. Access a Docker host with a user which was added to Docker user group
  2. Run the following command to create a backup file in the Docker Host
    $ ./backup
    		

    t will backup qTest on Docker host and save it as yyyy-mm-dd.tar.gz, in which yyyy-mm-dd is the date when the backup file was created.

  3. In case you want to backup and then download the backup file from the Docker host to your local machine, run this command
    $ ./backup pull
    		

    It will download yyyy-mm-dd.tar.gz, in which yyyy-mm-dd is the date when the backup file was created, to your current directory.

Docker Restore

If you deploy qTest Manager on multiple Docker hosts, please repeat the following steps for each host.

  1. Access a Docker host with a user which was added to Docker user group
  2. Run the following command to restore data from a backup file
    • You can use yyyy-mm-dd to restore from a specific date when the backup file was created
    • If it is omitted, the latest backup file will be used
    ./restore [yyyy-mm-dd]
    		
  3. If you want to restore from a backup file which was downloaded to your local machine, run this command and pass in the file path
    ./restore [path to yyyy-mm-dd.tar.gz]
    		

Linux (non-Docker)

Linux Backup

NOTE: Before you begin, please shut down qTest Manager and Sessions.

You will need to back up qTest Manager database and the integration (Poseidon) database following the steps below:

  1. To make sure that you back up the correct databases, access to the installation directory of qTest Manager. Open file qtest_env.sh and check out the dabase information which you will need to execute the command in step #2
    ...
    DB_HOST=[PostgreSQL server's host name or IP]
    DB_PORT=[PostgreSQL server's port]
    DB_USER=[username to log in to PostgreSQL]
    DB_PASSWD=[password to log in to Postgres]
    DB_NAME=[schema name of qTest database]
    ...
    POSEIDON_DB_HOST=[PostgreSQL server's host name or IP]
    POSEIDON_DB_PORT=[PostgreSQL server's port]
    POSEIDON_DB_USER=[username to log in to PostgreSQL]
    POSEIDON_DB_PASSWD=[password to log in to Postgres]
    POSEIDON_DB_NAME=[schema name of Poseidon database]
    		
  2. Access to the PosgreSQL server. Execute the following commands
    pg_dump --host=[DB_HOST] --port=[DB_PORT] --username=[DB_USER] --password --dbname=[DB_NAME] > [file_name].sql
    pg_dump --host=[POSEIDON_DB_HOST] --port=[POSEIDON_DB_PORT] --username=[POSEIDON_DB_USER] --password --dbname=[POSEIDON_DB_NAME] > [file_name].sql
    		

NOTE: To back up attachment, you can back up the files stored in the directory as defined in ATTACHMENT_DIR in qtest_env.sh file

Linux Restore

You will need to restore data to qTest Manager database and the integration (Poseidon) database following the steps below:

  1. To make sure that you restore data to the correct databases, access to the installation directory of qTest Manager. Open file qtest_env.sh and check out the dabase information which you will need to execute the command in step #2
    ...
    DB_HOST=[PostgreSQL server's host name or IP]
    DB_PORT=[PostgreSQL server's port]
    DB_USER=[username to log in to PostgreSQL]
    DB_PASSWD=[password to log in to Postgres]
    DB_NAME=[schema name of qTest database]
    ...
    POSEIDON_DB_HOST=[PostgreSQL server's host name or IP]
    POSEIDON_DB_PORT=[PostgreSQL server's port]
    POSEIDON_DB_USER=[username to log in to PostgreSQL]
    POSEIDON_DB_PASSWD=[password to log in to Postgres]
    POSEIDON_DB_NAME=[schema name of Poseidon database]
    		
  2. Access to the PostgreSQL server. Use the backup files and execute the following command for both of the databases
    psql --host=[postgresql_host] --port=[postgresql_port] --username=[user] --password --dbname=[database_schema] < [backup_file].sql
    		

Windows

Windows Backup

NOTE: Before you begin, please shut down qTest Manager and Sessions.

You will need to back up qTest Manager database and the integration (Poseidon) database following the steps below:

  1. To make sure that you back up the correct databases, access to the installation directory of qTest Manager. Open file qtest.config and check the database names 
    qtestconfig - DB names
  2. Access to PostgreSQL server. Open the Command Prompt. Access to the bin directory under your PostgreSQL's installation directory (eg: C:\Program Files\PostgreSQL\9.5\bin)
  3. Execute the following command for both of the databases
    pg_dump.exe --host=[postgresql_host] --port=[postgresql_port] --username=[user] --password --dbname=[database_name] > [file_name].sql
    		

NOTE: Back up qTest Manager's attachments stored in the directory as defined in attachmentDirectory in qTest.config file

qtestconfig - attachment dir

Windows Restore

You will need to restore data to qTest Manager database and the integration (Poseidon) database following the steps below:

  1. To make sure that you restore to the correct databases, access to the installation directory of qTest Manager. Open file qtest.config and check the database names 
    qtestconfig - DB names
  2. Access to PostgreSQL server. Open the Command Prompt. Access to the bin directory under your PostgreSQL's installation directory (eg: C:\Program Files\PostgreSQL\9.5\bin)
  3. Use the backup files and execute the following command for both of the databases
    psql.exe --host=[postgresql_host] --port=[postgresql_port] --username=[user] --password --dbname=[database_schema] < [backup_file].sql
    		
Subscribe To Our Blog
Powered by Zendesk