dradis:professional

Support » Guides » Exporting, importing and backing up your data

Exporting, importing and backing up your data

The scripts mentioned in this guide are available in Dradis Pro v1.9 and newer. If you need to export from a pre-v1.9 installation, copy the scripts across to your old installation first.

Starting with Dradis Pro v1.9 there are a number of migration scripts that let you export, import and backup all your data easily.

In this guide we cover:

  • How to migrate data from an old install to a new one
  • How to export your data for backup puposes

1 Before we begin

You can find these scripts under:


/opt/dradispro/bin/

You may need to copy them across to your pre-v1.9 install if you want to export your data into a new install.

Once you copy them to your old install make sure to place them in a location in your $PATH, or alternatively use the full path to the script in the commands below (e.g. /tmp/dp-export-attachments) instead of providing just the script name.

2 Exporting and importing your data

Dradis provides a set of scripts to make exporting all your data easily. The export scripts can be used to move your data from an old install to a newer one or to just backup your data.

In this guide we’ll use [dradispro.old] to refer to the original install containing the data you want to export / backup and [dradispro.new] to refer to a new and fresh install where the data will end up being imported.

Run these commands from your local machine (note that each command can be run in a single line, although we’re breaking them up in two):


$ ssh dradispro@[dradispro.old] -- 'dp-export-attachments' |\
    ssh dradispro@[dradispro.new] -- 'dp-import-attachments'

$ ssh dradispro@[dradispro.old] -- 'dp-export-mysql' |\
    ssh dradispro@[dradispro.new] -- dp-import-mysql

$ ssh dradispro@[dradispro.old] -- 'dp-export-templates' |\
    ssh dradispro@[dradispro.new] -- 'dp-import-templates'

From our local machine or laptop we are connecting to [dradispro.old] running the export script and then piping the result to the import script running in [dradispro.new].

2.1 Too much piping?

If this is a bit too much magic for you, you can break each of the steps in two: export data and dump into an intermediate file in your laptop and then pipe that file into the new install. For example:


$ ssh dradispro@[dradispro.old] -- 'dp-export-attachments' > dradis-attachments.tar
$ cat dradis-attachments.tar | ssh dradispro@[dradispro.new] -- 'dp-import-attachments'

3 Backing up your data

The backup operation is conceptually the same as the export operation described earlier, the only difference is that instead of piping the export scripts to the import scripts in the new VM we just archive the results.

Run these commands from your local machine:


$ ssh dradispro@[dradispro] -- 'dp-export-attachments' > dradis-attachments.tar
$ ssh dradispro@[dradispro] -- 'dp-export-mysql' | gzip > dradis-mysql-backup.sql.gz
$ ssh dradispro@[dradispro] -- 'dp-export-templates' > dradis-templates.tar

You can script this and combine it with your standard backup software to make sure all your Dradis data is safe.

In addition, you should consider the additional step of encrypting your backups for good measure (something simple like openssl should do the trick):


$ openssl enc -aes-256-cbc -salt -in file.plain -out file.enc

Guide contents

  1. Before we begin

  2. Exporting and importing your data

  3. Backing up your data

Download resources

Our users can download the resources used in this guide here.