-
-
Notifications
You must be signed in to change notification settings - Fork 785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invoke-DbaDbLogShipping - Fix issues with Restore*Folder #8157
Invoke-DbaDbLogShipping - Fix issues with Restore*Folder #8157
Conversation
Message from Slack: Hi All.I am trying to setup Logshipping for DB1 to the same server ( as DB1_Copy). But the new DB is getting restored to default DATA & LOG directory(to F drive, instead of N drive).Am I missing a parameter? Could you please help?
|
The idea of the subfolder was to make sure that when the database had the same file names, you could still restore it on the same server. |
Hi Andreas..I tested it but getting a different error now. I am able to see the PreLogShipping backup file in the share I specified PrimaryInstance : sqlserver |
What do you get when you run $error[0] | fl -force |
Thanks Sander for stepping in. |
Please find the o/p of $error[0] | fl -force Exception : System.Management.Automation.CommandNotFoundException: The term 'Write-Message' is not recognized as the name of a cmdlet, function, script file, or |
Well that error does not make much sense because that command is being used throughout the command and other commands as well. Can you run the command for initialing the log shipping with -Verbose so we can see what the command does in the background? |
Thanks Sander, I could execute the script successfully but DB still gets created on the default location. Please find the logs attached. |
I just pushed a new commit to the branch which added some more verbose messages. This way we can prove that the new code path is executed. |
But your verbose output is missing "Testing database restore" which tells me that you don't run this branch here. |
will merge upon agreement and approval |
Hi Andreas, Thanks for providing the detailed steps. I tested the new code & it worked perfectly :-) Thanks again for the quick fix & help. |
Hey all -- does @Abhilash1987's comment mean this is good and can be merged? |
I think so. |
Type of Change
.\tests\manual.pester.ps1
)Was reported on slack by Abhi.
I don't know what the idea of the per-database-subfolder was - but as it never worked, I removed it.
@sanderstad Do you have time to have a look?