Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
build: use mysqldump to backup/restore databases
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveagent57 committed Feb 26, 2024
1 parent e6bbf93 commit 851ae70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,13 @@ dev.dbcopy8.%: ## Copy data from old mysql 5.7 container into a new 8 db
dev.dbshell.%: ## Run a SQL shell on the given database.
docker compose exec mysql80 bash -c "mysql $*"

dev.mysqldumpall:
docker compose exec mysql80 mysqldump --all-databases > .dev/devstackall.sql

dev.mysqlrestoredump: dev.up.mysql80
sleep 10 # give it time
docker compose exec -T mysql80 mysql < .dev/devstackall.sql

# List of Makefile targets to run static asset generation, in the form dev.static.$(service)
# Services will only have their asset generation added here
# if the service is present in both $(DEFAULT_SERVICES) and $(ASSET_SERVICES).
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,6 @@ services:
- memcached
- mongo
- mysql80
- mysql57
# Allows attachment to the LMS service using 'docker attach <containerID>'.
stdin_open: true
tty: true
Expand Down

0 comments on commit 851ae70

Please sign in to comment.