-
Notifications
You must be signed in to change notification settings - Fork 20
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
Conversation
scripts/restore-from-backup.sh
Outdated
@@ -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") |
There was a problem hiding this comment.
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
I have made the required changes. Check that out. |
Have you tested the script? |
Can you send a longer screenshot? We could also help you debug faster if you join our Slack. |
There was a problem hiding this 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.
solved the issue #112