Skip to content

Incorrect syntax/usage of nz_azConnector command run should return error.#14

Open
Ram-Nerpagar wants to merge 1 commit into
IBM:masterfrom
Ram-Nerpagar:Ram-N
Open

Incorrect syntax/usage of nz_azConnector command run should return error.#14
Ram-Nerpagar wants to merge 1 commit into
IBM:masterfrom
Ram-Nerpagar:Ram-N

Conversation

@Ram-Nerpagar
Copy link
Copy Markdown
Contributor

@Ram-Nerpagar Ram-Nerpagar commented Mar 23, 2023

Problem:- nz_azConnector command was not returning error even when - was not passed to flag in command.

Solution:- 1) If an user don't pass a value for a particular flag then it will error out an message. But for database,
directory and npshost flags the code will fetch the values from the environment variables even if the
user don't pass the value while running the command.
2) Code will print a proper message if user don't pass '-' to a particular flag. If user don't pass '-' to a flag
then Go language treats every argument after that particular flag as an positional argument.

Testing:- 1) If user don't pass a value for db while running the command then the code will fetch the value as
"NZ_DATABASE" from the environment variables. Same for dir and npshost. Hence the code will run fine
even if the value for db, dir and npshost is not provided in the command.
2) In the command if user missed to pass '-' to storage-account then the code will consider remaining
command as a value for npshost. Hence the code will print a proper message showing that "Did you
miss '-' in any flag? If so Go treats remaining flags as the positional arguments".

@Ram-Nerpagar Ram-Nerpagar marked this pull request as draft March 27, 2023 08:24
@Ram-Nerpagar Ram-Nerpagar marked this pull request as ready for review March 28, 2023 05:41
Copy link
Copy Markdown
Collaborator

@ssayyed21 ssayyed21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving as per Dev.

Comment thread bnr-utils/nz_azConnector/nz_azConnector.go Outdated
Signed-off-by: Ram-Nerpagar <Ram.Nerpagar@ibm.com>
Copy link
Copy Markdown

@deleisha deleisha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks

@abhishekjog
Copy link
Copy Markdown
Member

As far as I can remember, our idea was that with single command the customer would be able to move all backups for all databases. Usually nzbackup -dir option is some mount path of SAN/LAN storage where all backups are taken. So with single "nz_azConnector -dir " command, we can move all /Netezza/// hierarchy in one go.

Please check if that is correct.

@ram3425
Copy link
Copy Markdown
Contributor

ram3425 commented Aug 9, 2023

Hi Abhishek, we can back up a single db in one go but we cannot backup multiple db's.

Case 1) DB1 database is being backed up.

image

Case 2) If -db is not specified then we cannot backup.

image

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

Successfully merging this pull request may close these issues.

6 participants