Document

SUBSCRIBE TO GET FULL ACCESS TO THE E-BOOKS FOR FREE 🎁SUBSCRIBE NOW

Professional Dropdown with Icon

SUBSCRIBE NOW TO GET FREE ACCESS TO EBOOKS

Docker Swarm - Backup and Restore

Backup

cd /var/lib/docker/

tar -zcvf swarm.tar.gz swarm/

docker node ls

Delete the docker swarm folder

rm -ifr swarm

systemctl stop docker

systemctl start docker

docker node ls

By this time you will not be able to access the cluster because swarm folder is deleted

Restore 

systemctl stop docker

rm -fr swarm

tar -xvzf swarm.tar.gz

systemctl start docker

docker node ls

Share your love

Leave a Reply

Your email address will not be published. Required fields are marked *