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

Backup 113 #116

Closed
wants to merge 5 commits into from
Closed

Backup 113 #116

wants to merge 5 commits into from

Conversation

ivanchainik
Copy link

@ivanchainik ivanchainik commented Apr 20, 2021

  • Create a bash-script for DB backup
  • Add instruction on README

#113

Copy link
Owner

@arybin93 arybin93 left a comment

Choose a reason for hiding this comment

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

Looks good. The next step, copy SQL dump from container to host.
And analogically, make a backup for all loaded file, docker volume media_data:

- media_data:/lmnad/project/media

now=$(date +"%d_%m_%Y")

docker exec -i lmnad_mysql_dev $mysqldump --user=$mysql_user --password=$mysql_password --databases lmnad_db | gzip > backup/backup_$now.sql.gz

Copy link
Owner

Choose a reason for hiding this comment

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

Please, add docker cp command for copying sql.gz file from container to host, set the target directory as a variable at beginning of the script. Thank you.

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