Created
August 12, 2023 23:17
-
-
Save deevis/fa50df908bef0aee2ac898961ca0ebf7 to your computer and use it in GitHub Desktop.
Portainer - backup/new docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To backup portainer volume | |
_backup_time=$(date +"%F_%H_%M%P"); sudo tar cvfz /mnt2/docker/backups/portainer/portainer_backup_${_backup_time}.tar.gz /var/lib/docker/volumes/portainer_data | |
# To run new portainer container with ports and volumes and local docker.sock | |
docker run -p 8000:8000 -p 9000:9000 --name portainer -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment