Upgrade an Acunetix Docker container

Before upgrading your main Acunetix Docker container, you must ensure that your setup already uses a separate data volume.

Avoid Data Loss when upgrading your Acunetix Docker container

Your Acunetix docker container must be configured to use a separate data volume to avoid losing data when upgrading your Acunetix version.

Scenario 1: You are already using a separate data volume for Acunetix data

In this scenario, you should perform the following steps:

  • make a backup of your data volume's contents as a safety precaution
  • perform the upgrade of the main Acunetix Docker container attaching the same data volume which was attached to the container containing the previous version

Backup your data volume's contents

On the docker host:

  • create a folder to store your backup and adjust permissions on the folder

mkdir /axbak

chmod 777 /axbak

  • stop the main Acunetix container

docker stop axmain

  • create the backup archive

docker cp -a axmain:/home/acunetix/.acunetix - > /axbak/acunetix-backup.tar

Upgrade the main Acunetix Docker container

On the docker host:

  • update the acunetix docker image to the latest version

docker pull invicti/acunetix:latest

  • stop the main Acunetix container if it is running

docker stop axmain

  • rename the old container for safety

docker rename axmain axmain-old

  • run your new container using the latest acunetix docker image and your data volume (replacing the hostname with your value)

docker run -d -p 3443:3443 -p 7880:7880 \

  --name "axmain" \

  --hostname 192.168.5.142 \

  -v acunetix-data:/home/acunetix/.acunetix \

  invicti/acunetix:latest

Scenario 2: You are NOT using a separate data volume for Acunetix data

In this scenario, you should perform the following steps:

  • make a backup of your data
  • restore your backup data onto a new data volume and upgrade of the main Acunetix Docker container attaching the data volume you have just created

Backup Acunetix data from the current Acunetix container

Perform the following steps on the Docker host:

  • create a folder to store your backup and adjust permissions on the folder

mkdir /axbak

chmod 777 /axbak

  • stop the main Acunetix container

docker stop axmain

  • create the backup archive

docker cp -a axmain:/home/acunetix/.acunetix - > /axbak/acunetix-backup.tar

Restore Acunetix data to a new data volume and upgrade your main Acunetix Docker container

Perform the following steps on the Docker host:

  • create a new data volume

docker volume create acunetix-data

  • update the acunetix docker image to the latest version

docker pull invicti/acunetix:latest

  • stop the main Acunetix container if it is running

docker stop axmain

  • rename the old container for safety

docker rename axmain axmain-old

  • create a new Acunetix container using the new data volume and the same ports as the previous container to match the settings in the backup archive (replacing the hostname with your value)

docker run -d -p 3443:3443 -p 7880:7880 \

  --name "axmain" \

  -v acunetix-data:/home/acunetix/.acunetix \

  invicti/acunetix \

  --hostname 192.168.5.142

  • stop the new Acunetix container

docker stop axmain

  • restore the archived data into the new data volume

docker cp - axmain:/home/acunetix < /axbak/acunetix-backup.tar

  • start the new Acunetix container

docker start axmain

 

« Back to the Acunetix Support Page