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

Dumping and copying database to the root of the project. #121

Open
u-03c9 opened this issue Apr 6, 2023 · 0 comments
Open

Dumping and copying database to the root of the project. #121

u-03c9 opened this issue Apr 6, 2023 · 0 comments

Comments

@u-03c9
Copy link

u-03c9 commented Apr 6, 2023

Is your proposal related to a problem?

When we want to export the database dump file, we first need to look for the name of the docker volumn that's running mariadb, then we run:
docker exec <mariadb_volumn_name> mysqldump magento --single-transaction --no-tablespaces -u magento -pmagento --result-file=/tmp/dump.sql

then we need to copy the dump file from the docker to our project root.
docker cp <mariadb_volumn_name>:/tmp/dump.sql ./dump.sql

Describe the solution you'd like

add an extra command to automate dumping and copying the file to the root of the project while still being able to pass arguments to mysqldump.

for example:

npm run export-db -- --file-name="april-6.sql" --single-transaction --no-tablespaces

Describe alternatives you've considered

creating a shell script for each project, which is not really the best idea :)

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant