Migrate from one Docker host to another

In this guide we'll use [old-host] for the source Docker host and [new-host] for the destination. Both should be running the same version of Dradis before you begin. If you need to upgrade at the same time, migrate first, then upgrade on the new host.

Step 1: Back up data on the source host

With Docker, Dradis content is stored in Docker Volumes rather than in the container itself. As such, your volumes are accessible from outside the container, so you can back up or move them as you like.

When migrating to a new Docker host, simply copy or move the volumes over to the new host.

Step 2: Deploy Dradis on the new host

Run the installer on the new host with the same configuration as the source. Do not start the stack yet after install — stop it before the application initialises for the first time:

$ ssh deployer@[new-host] 'docker compose down'

Step 3: Start the stack and verify

$ ssh deployer@[new-host] 'docker compose up -d'

Navigate to https://[new-host]/pro and confirm your projects, attachments, and templates are present before decommissioning the old host.

Backing up your data

The following volumes contain data that must be included in any backup for full disaster recovery. See the volume reference for the complete list of what each volume holds.

Run these commands from your local machine:

$ ssh deployer@[dradispro] -- 'docker exec app dp-export-attachments' > dradis-attachments.tar

$ ssh deployer@[dradispro] -- 'docker exec app dp-export-mysql' | gzip > dradis-mysql-backup.sql.gz

$ ssh deployer@[dradispro] -- 'docker exec app dp-export-templates' > dradis-templates.tar

$ ssh deployer@[dradispro] 'docker exec app dp-export-storage' > dradis-storage.tar

Also back up the credentials volume separately, as it holds the encryption keys required to restore any of the above:

$ ssh deployer@[dradispro] 'docker run --rm -v dradis-credentials:/data busybox tar -cf - -C /data .' > dradis-credentials.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

Great job, you reached the end of the guide! Have you read all of them?

Seven Strategies To Differentiate Your Cybersecurity Consultancy

You don’t need to reinvent the wheel to stand out from other cybersecurity consultancies. Often, it's about doing the simple things better, and clearly communicating what sets you apart.

  • Tell your story better
  • Improve your testimonials and case studies
  • Build strategic partnerships

Loading form...

Your email is kept private. We don't do the spam thing.