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

Improve db:dump for multiple schemas #945

Open
alexthunder3 opened this issue Jun 9, 2020 · 3 comments
Open

Improve db:dump for multiple schemas #945

alexthunder3 opened this issue Jun 9, 2020 · 3 comments

Comments

@alexthunder3
Copy link

Hey guys.
Loving the tool so far!
I've come up to a use case that can't be that well automated. And that is the db:dump on projects with multiple schemas. A dump for each relationship can be done by doing a loop over the PLATFORM_RELATIONSHIPS, but only the default schema shows up there. Manually dumping on CLI brings up the 0/1/etc selection, and it can be specified which schema to dump with --schema. But I can't find a way to automate a dump for all available schemas.
Is it possible to get a list of schemas that I didn't find yet?
If not, is this a feature you guys will consider implementing?
Even better would be an option to dump all database relationships, and all schemas for each database relationships.
The purpose of this is longer term storage of database backups. And the first step for that is to get dumps from all databases/schemas or whatever complex database setup a project might have, without having to check and customize the script for each project.

Thanks in advance for any answer,
Best regards,
Alex.

@pjcdawkins
Copy link
Collaborator

That makes a lot of sense. The command was originally written before multiple schema support so it has had to evolve while keeping backwards compatibility.

doing a loop over the PLATFORM_RELATIONSHIPS, but only the default schema shows up there

is that because there are multiple apps?

@alexthunder3
Copy link
Author

No, single app with 2 databases, but using a single relationship with 2 schemas.

pimcore_mysqldb:
  type: mysql:10.2
  disk: 5360
  configuration:
    schemas:
      - project_database
      - ablex
    endpoints:
      pimcore_admin:
        default_schema: project_database
        privileges:
          project_database: admin
          ablex: admin

@alexthunder3
Copy link
Author

alexthunder3 commented Jun 10, 2020

Ah, i meant i can use loop for projects with multiple apps. I'm trying to make a script that backs up dumps for all kinds of projects. But couldn't automate the schema, so it has to be customized for each project at the moment..

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

No branches or pull requests

2 participants