Skip to content

Conversation

@alexoelke
Copy link
Collaborator

No description provided.

@alexoelke alexoelke requested a review from pdamodha December 21, 2020 21:52
@alexoelke alexoelke force-pushed the feature/mssql_recover_from_copy_workflow branch from d090677 to 202c26c Compare January 4, 2021 19:59
danielkempenich
danielkempenich previously approved these changes Jan 7, 2021
This mssql_db_backup_restore.py script demonstrates how to Protect a MSSQL Database or Instance using a protection plan, and perform a alternate recovery of a single database or all user databases using NetBackup APIs.

`python -W ignore recipes/python/backup-restore/mssql_db_backup_restore.py --master_server <master_server> --master_server_port 1556 --master_username <master_username> --master_password <master_password> --mssql_instance <mssql_instance_name> --mssql_database <mssql_database_name> --mssql_server_name <mssql_server_name> --mssql_use_localcreds 0 --mssql_domain <mssql_domain> --mssql_username <mssql_sysadmin_user> --mssql_password <mssql_sysadmin_pwd> --stu_name <storage_unit_used_in_protection_plan> --protection_plan_name <protection_plan_name> --asset_type <mssql_asset_type> --restore_db_prefix <mssql_restore_database_name_prefix> --restore_db_path <mssql_restore_database_path> --recoveralluserdbs <0|1>`
`python -W ignore recipes/python/backup-restore/mssql_db_backup_restore.py --master_server <master_server> --master_server_port 1556 --master_username <master_username> --master_password <master_password> --mssql_instance <mssql_instance_name> --mssql_database <mssql_database_name> --mssql_server_name <mssql_server_name> --mssql_use_localcreds 0 --mssql_domain <mssql_domain> --mssql_username <mssql_sysadmin_user> --mssql_password <mssql_sysadmin_pwd> --stu_name <storage_unit_used_in_protection_plan> --protection_plan_name <protection_plan_name> --asset_type <mssql_asset_type> --restore_db_prefix <mssql_restore_database_name_prefix> --restore_db_path <mssql_restore_database_path> --recover_all_user_dbs <0|1> --recover_from_any_copy <True|False> --copy_stu_name <storage_unit_used_for_copy>`

Choose a reason for hiding this comment

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

Alex, I'm wondering if the '--recover_from_any_copy' option would be better named '--recover_from_copy' and it have it accept the copy specification (I'm not sure if that is a media description or copy number) that identifies the copy to restore? The create_mssql_recovery_request() function looks like it creates a recovery request for each copy - is that correct? I think it would be more interesting to just create a single recovery request for the specified copy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah the term recover from copy makes more sense, I've updated it to reflect it and I've changed it for the user to specify which one they want to recover from 1 or 2 since in this situation we only have 1 copy other than the primary.

pdamodha
pdamodha previously approved these changes Jan 13, 2021
@alexoelke alexoelke dismissed stale reviews from pdamodha and danielkempenich via 92f05a8 January 14, 2021 16:44
@alexoelke alexoelke force-pushed the feature/mssql_recover_from_copy_workflow branch from 202c26c to 92f05a8 Compare January 14, 2021 16:44
@alexoelke alexoelke force-pushed the feature/mssql_recover_from_copy_workflow branch from 92f05a8 to bb2086c Compare January 14, 2021 20:20
@rkennedy rkennedy merged commit 8900df5 into master Apr 29, 2021
@rkennedy rkennedy deleted the feature/mssql_recover_from_copy_workflow branch April 29, 2021 21:22
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