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

Commit 851ae70

Browse files
committed
build: use mysqldump to backup/restore databases
1 parent e6bbf93 commit 851ae70

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,13 @@ dev.dbcopy8.%: ## Copy data from old mysql 5.7 container into a new 8 db
482482
dev.dbshell.%: ## Run a SQL shell on the given database.
483483
docker compose exec mysql80 bash -c "mysql $*"
484484

485+
dev.mysqldumpall:
486+
docker compose exec mysql80 mysqldump --all-databases > .dev/devstackall.sql
487+
488+
dev.mysqlrestoredump: dev.up.mysql80
489+
sleep 10 # give it time
490+
docker compose exec -T mysql80 mysql < .dev/devstackall.sql
491+
485492
# List of Makefile targets to run static asset generation, in the form dev.static.$(service)
486493
# Services will only have their asset generation added here
487494
# if the service is present in both $(DEFAULT_SERVICES) and $(ASSET_SERVICES).

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,6 @@ services:
418418
- memcached
419419
- mongo
420420
- mysql80
421-
- mysql57
422421
# Allows attachment to the LMS service using 'docker attach <containerID>'.
423422
stdin_open: true
424423
tty: true

0 commit comments

Comments
 (0)