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

Commit 145a3a0

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

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
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).

0 commit comments

Comments
 (0)