Skip to content

Backups for UCP and DTR

AJ NOURI edited this page Jan 17, 2018 · 2 revisions

UCP (Universal Control Plane)

Backup UCP

docker container run \
--rm  \
-it  \
--name ucp  \
-v /var/run/docker.sock:/var/run/docker.sock  \
docker/ucp:2.2.4  \
install  \
--host-address 192.168.218.104  \
--interactive

Restore UCP

docker container run \
--log-driver none \
--rm  \
-i  \
--name ucp  \
-v /var/run/docker.sock:/var/run/docker.sock  \
docker/ucp  \
restore  < backup.tar

DTR

Backup DTR (from worker1, the dtr)

[root@worker1 ~]# docker run -i --rm docker/dtr backup --ucp-username admin --ucp-password mypass --ucp-url https://manager1.ajnouri.com:443 --ucp-insecure-tls > dtr-backup.tar

INFO[0000] Validating UCP cert
INFO[0000] Connecting to UCP
INFO[0001] Searching containers in UCP for DTR replicas INFO[0002] This cluster contains the replicas: 0ef140163717 Choose a replica to back up from [0ef140163717]: INFO[0000] Validating UCP cert
INFO[0000] Connecting to UCP
INFO[0000] Connecting to network: dtr-ol
INFO[0000] Waiting for phase2 container to be known to the Docker daemon INFO[0001] Establishing connection with Rethinkdb
INFO[0005] Backing up DTR
INFO[0005] Establishing connection with Rethinkdb
INFO[0014] Backup complete.

Check the resulting backup file:

[root@worker1 ~]# ls

anaconda-ks.cfg docker-install-centos.sh dtr-backup.tar

Restore DTR

docker run \
-i \
--rm \
docker/dtr restore  \
--ucp-username admin \
--ucp-password mypass \
--ucp-url https://manager1.ajnouri.com:443 \
--ucp-insecure-tls < dtr-backup.tar