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

update restore-from-backup script #122

Closed
wants to merge 2 commits into from
Closed

update restore-from-backup script #122

wants to merge 2 commits into from

Conversation

Dhruv-Pattel
Copy link

@Dhruv-Pattel Dhruv-Pattel commented Dec 19, 2023

solved the issue #112

@@ -6,3 +6,12 @@ source .env
MYSQL_CONTAINER=$(docker ps --format '{{ .Names }}' | grep mysql)
docker cp $1 $MYSQL_CONTAINER:metakgp_wiki_db.sql
docker exec $MYSQL_CONTAINER sh -c 'mysql -u metakgp_user -p'$MYSQL_PASSWORD' metakgp_wiki_db < metakgp_wiki_db.sql'

result=$(find /backup -type f -name "images")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rename this to something more descriptive like images_exist? Also shouldn't the command be find ./backup?

made the required changes
@Dhruv-Pattel
Copy link
Author

I have made the required changes. Check that out.

@harshkhandeparkar
Copy link
Member

Have you tested the script?

@Dhruv-Pattel
Copy link
Author

I tested the script without running the containers (cause I was getting errors while running containers as mentioned in the documentation).

error while running container 👇
container

running script 👇
bash

@harshkhandeparkar
Copy link
Member

I tested the script without running the containers (cause I was getting errors while running containers as mentioned in the documentation).

error while running container 👇 container

Can you send a longer screenshot? We could also help you debug faster if you join our Slack.

Copy link
Member

@shikharish shikharish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script should take the path to a tar.gz file(the one downloaded from cloud backup) as an argument. So we would have to extract the tar file first, then copy the sql file to the container, check if there is an images folder and copy that folder too.

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.

3 participants