Last active
July 22, 2020 14:34
-
-
Save lcuevastodoit/a8fd17104f1201bc2dc6cd9a0ed7d746 to your computer and use it in GitHub Desktop.
Docker Rescue Command
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
#Create a new folder | |
mkdir RescueFolder | |
cd RescueFolder | |
#Make the image backup from the container with problems. | |
docker commit <container-id> <backup-image-name> | |
#then run a new container with that image | |
docker run -ti --entrypoint=sh <backup-image-name> | |
#in other terminal session se the temporary container name that is running | |
docker ps | |
CONTAINER ID IMAGE NAMES | |
db4d5ed458f5 <backup-image-name> practical_lovelace | |
#then copy from temporary container to local folder | |
docker cp practical_lovelace:/app/db/development.sqlite3 customer.sqlite3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment