Docker
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
#create a container and link
sudo docker run --name wordpress -p 8080:80 --link db_container -d wordpress
here db_container is a database container
#create a container and link
sudo docker run --name wordpress -p 8080:80 --link db_container -d wordpress
here db_container is a database container
Comments
Post a Comment