greenmask icon indicating copy to clipboard operation
greenmask copied to clipboard

add dbname to storage path

Open joao-zanutto opened this issue 1 year ago • 2 comments

joao-zanutto avatar Apr 14 '24 22:04 joao-zanutto

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:

  1. 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? 1.1. Should --database-name be required for validate, list-dump, show-dump commands? 1.2. Should --database-name be available for dump and restore? 1.3. Are we introducing a new --origin-database-name that is supposed to define the path to retrieve the dump used in restore?

joao-zanutto avatar Apr 16 '24 19:04 joao-zanutto

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

wwoytenko avatar Apr 27 '24 12:04 wwoytenko

I am closing this MR due to no changes. Feel free to open a new one.

wwoytenko avatar Sep 15 '24 21:09 wwoytenko