0

I have set up Wordpress and MariaDB on a Digital Ocean droplet. Both docker containers use data volumes (-v /root/mysite/mysql:/var/lib/mysql and -v /root/mysite/wordpress:/var/www/html/wp-content \) to persist data on the physical host.

Before I go experimenting on the site that may destroy my setup, how can I take a snapshot of the server setup or docker volumes so I can revert to them is something went wrong?

Can I simply make copies of /root/mysite/mysql and /root/mysite/wordpress and copy them back to their original locations to revert back to the working state?

0

Can I simply make copies of /root/mysite/mysql and /root/mysite/wordpress and copy them back to their original locations to revert back to the working state?

Sure, should work fine. Just make sure to stop MariaDB before making the copy to ensure that all state is saved to the filesystem properly and that the database files are in a consistent state.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.