add dbname to storage path
It is expected this MR will contain --database-name flag and path fixes usage in the list-dumps, restore, etc.
I have some questions that I wanted to validate before further development:
- From which config should the validate, list-dump, show-dump commands retrieve the dbname from? dump/restore? or should they retrieve the dbname from the new
--database-nameflag only? 1.1. Should--database-namebe required for validate, list-dump, show-dump commands? 1.2. Should--database-namebe available for dump and restore? 1.3. Are we introducing a new--origin-database-namethat is supposed to define the path to retrieve the dump used in restore?
This was partially discussed here
https://github.com/GreenmaskIO/greenmask/issues/68
By the way, there are the answers:
From which config should the validate, list-dump, show-dump commands retrieve the dbname from? dump/restore? or should they retrieve the dbname from the new --database-name flag only?
It is only for restore config and restore command should provide cmd flag as well
Should --database-name be required for validate, list-dump, show-dump commands?
Not it should not be required for them and should not be required at all. If not provided just use the latest dump without DB filtering. This is required only for restore command
Should --database-name be available for dump and restore?
Yes. But it must not affect the connection string or setting related to the connection
Are we introducing a new --origin-database-name that is supposed to define the path to retrieve the dump used in restore?
This is required only for restore command. By the way the best parameter name is --origin-database-name (instead of --database-name) because it is not affects the connection string it is just database name from the origin
I am closing this MR due to no changes. Feel free to open a new one.