Skip to content

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