In this video we’ll cover how to backup files from your docker container as well as a MySQL database. This is done with an installation of WordPress.
Original source
Docker Tutorial: Backing Up and Restoring MySQL and WordPress in Docker
Tags
docker, MySQL (Software), mysql tutorial, Software (Industry), Tutorial (Media Genre), Virtualization (Software Genre), WordPress (Blogger)
Share :
- tweet
-
About the : d4mer
sistema biblioteca php Mysql(CODIGO FUENTE GRATIS)
April 12th, 2019Apache, PHP & MySql on Docker
April 11th, 2019Python Flask and Vue Tutorial – Video 1
April 11th, 2019Importing MySQL Database
April 11th, 2019sistema escolar php y mysql Codigo Fuente Gratis
April 10th, 2019Connecting to MySQL database on Wampserver from any host (Computer)
April 10th, 201911 Comments
Leave A Comment
You must be logged in to post a comment.
kensley lewis
what is difference between this tutorial process, and simply doing a docker export (contianer id) for the wordpress container and mysql container?
Prakash Heda
Nice one….it helped… on;y if you have used non default user name and DB name that would be perfect from security point….
Moffassal Hossain
Excellent tutorial, This is all I needed to create a new wordpress from existing wordpress container. I like the simple approach; no fancy tools are involved. Of-course it can be automate using tools like Ansible or similar. Thanks again 🙂
Edvin Norling
Hey
Im currently getting rather nuts since im trying to get this thing in to a cronjob:
shouldn't it be something like:
docker run –rm -v $(pwd):/backups/ –link=mywrodpress_db_1:dz mysql /usr/bin/mysqldump –host$DZ_PORT_3306_TCP_ADDR -uroot -psecret wordpress > /backups/wordpress.sql
I have seen other people doing it with already fixed containers but now im to stubborn…
I can't get it to use my DZ_PORT_3306_TCP_ADDR variabel…
How do get it to use it's own variabel?
Since it's already linked i shouldn't have to define a -e DZ_PORT_3306_TCP_ADDR, half the point is to use the linked one ^^
Daniel Stinebaugh
For scripting reasons I'd lean on the "exec" option. For a mysql dump from your host just run something like
docker exec wpfig_db_1 mysqldump –all-databases –password=secret > /backups/wordpress.sql
Should result in you having your .sql file where you expect it 🙂 Keep up the vid's they're a great help!
Webdev Tory Anderson
As someone who's just getting started with Docker, this was a terrific tour through basic navigation of containers. I'm going to put this to good use as I figure out how to migrate my local WordPress sites to containers
Steven House
Doood – if you could create a video about how to create Mid-High level videos – the world could benefit from thiis. 🙂
Clifton Canady
after running the below command… why would the var/www/html directory be empty?
docker run -it –rm -v $(pwd):/backups –volumes-from=wpfig_file_1 busybox
Gert-Jan Bark
Would it be possible to map the file system to some container that supports incremental file system (preventing possible issues that could arrise if a user is working on the WP environment, between the dumping of the sql and the backup of the files)?
Peter Reginald
Thanks for this tutorial. You've helped me understand a great deal. Now I have to learn fig.
ikacns82
It would be great if you could show us a diagram like on the "Setting Up a WordPress Site Using Docker" that diagram really helped. It is a little difficult to mentally map what you are doing ( going in to container, exporting mysql, sharing volumes…)