Closed eoyduett closed 10 months ago
Which script are you referring to?
restoreSQLDBs.ps1
The script is working fine for me using similar inputs that you used. Please confirm that you can perform the same restore via the Cohesity UI, and confirm that the server names, instance names, and database names you are specifying are all correct.
restoring the same db with the same options works from the ui, same source and destination.
if i just remove the -sourceDBnames parameter and add the parameter for -allDBs the restore is working from the script.
Please send screenshots to Cedric of the search result page in the UI, and the successful recovery details and options pages in the UI
done
I have updated the script to page the search results. This should get past the huge JSON response due to the very high number of databases on the server. Please let me know if that helps: https://github.com/bseltz-cohesity/scripts/tree/master/sql/restoreSQLDBs
Note: this script will still perform one DB restore at a time, so still may not meet your needs. I am working on a v2 rewrite that will perform bulk restores using the 6.8.x bulk restore feature.
hi, yes tested again now with the new script, it works!
I have published a new v2 version of the script here: https://github.com/bseltz-cohesity/scripts/tree/master/sql/restoreSQLv2 it will restore multiple databases per restore task (100 per task by default, configurable). Please let me know how it works for you.
wow nice, i will test this ASAP!
is it possible to use a timeframe parameter with alldb's parameter so that you don't spend time restoring db's that were deleted a long time ago in a DR situation where you only need to restore the db's that were active yesterday, etc
Done. I have added a -newerThan parameter (when restoring allDBs, only include databases backed up in the last X days), e.g. -newerThan 7
hm, ok? comment deleted.
Your screenshot was visible during web page loading, so I deleted it for your safety. Let's use email when troubleshooting
Hi
specifying source dB does not work
tested with both the INSTANSNAME/db_name and just db__name.
Database db_name not found!
restoreSQLDBs.ps1
input: .\restoreSQLDBs.ps1 -sourceServer some_server -sourceInstance SQL12345 -targetServer some_server -targetInstance sql67891 -vip ip -username some_user -password some_password -mfaCode mfa_code -mdfFolder c:\some_folder -sourceDBnames some_db_name -latest