Docker Community Forums

Share and learn in the Docker community.

DTR on AWS - back-ups, restoration


Used DTR(BYOL) ami to start up DTR instance in AWS.
Currently backing up instance data by taking ami snapshots - those requires an instance restart - not the best approach.
Images are stored in S3, that end is covered.

Could you please elaborate are there any guidelines and\or documentation describing recommended back-up, disaster recovery strategies?

1 Like

I am also looking for backup/restore at least of settings so that I can be production ready. Without it, DTR is not practical. I do not want to snapshot the running VM. I see that you can export settings, but there is no import. This looks like a large product gap.

What we have done is this. On a node (manager or worker):

export timestamp=$(date +"%Y-%m-%d_%H-%M-%S")
docker run -i --rm docker/dtr \
   backup \
     --ucp-url \
     --ucp-insecure-tls \
     --existing-replica-id 0000000000 \
     --ucp-username admin \
     --ucp-password admin > ./backups/dtr-backup_$timestamp.tar
   docker run --rm \
      -v $PWD:/data \
      --env AWS_DEFAULT_REGION=eu-west-1 \
      garland/aws-cli-docker \
      aws s3 mv ./backups/dtr-backup_$timestamp.tar s3://backup-bucket/dtr-backup_$timestamp.tar

What we do is the backup and then we move it to a S3 bucket using the Garland AWS CLI image.

We also have a dtr_update script on the same node. In that, we do this:

docker pull docker/dtr:$1

echo "Updating..."

docker run -it --rm \
    docker/dtr:$1 upgrade \
    --ucp-insecure-tls \
    --ucp-url \
    --ucp-insecure-tls \
    --existing-replica-id 000000000 \
    --ucp-username admin \
    --ucp-password admin
echo "Update done. Setting dtr to latest to aid backup."

docker pull docker/dtr

echo "Done."

What we still have left to do is figuring out how to add it to the crond. We can add it with crontab but there is no way to restart the crond from within the aws-shell. How do you break out of the aws-shell and into the actual Alpine?


This image backup software is the best option for you. I’ve used it several times when the situation was really urgent and I needed my data back immediately.