Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backup and restore functionality as discussed in Cloud Seminar #15 2023 #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sahil-sagwekar2652
Copy link

@sahil-sagwekar2652 sahil-sagwekar2652 commented Nov 14, 2023

New compose file docker-compose.yml-cron-backup added.

To test the changes -

  • copy the contents of docker-compose.yml-cron-backup to docker-compose.yml
  • run docker compose up
  • go to the wp site, install wp and create a blog post.
  • now run the following command docker exec -it <db-container-name> /usr/local/bin/backup.sh
  • bring down the containers docker compose down
  • sudo rm -rf wp-content
  • now run the following command docker exec -it <db-container-name> /usr/local/bin/restore.sh
  • now when you go to the wp page you will see that the data has been restored.

Further -

  • find a way to run restore.sh everytime the container starts.

@lvnilesh
Copy link
Member

Back up three things:

  1. Files in WP content
  2. Any custom config
  3. DB data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants