question

Cataster-7485 avatar image
0 Votes"
Cataster-7485 asked Cataster-7485 commented

How to make use of the internal functions?

Not sure the best way to title this thread but basically we want to store backups on Azure Blob storage, yet Invoke-DbaDbLogShipping requires a $BackupNetworkPath. The closest I was to this was Azure File Shares but unfortunately port 445 is blocked it seems so I cant utilize that.

Im now trying to modify the Invoke-DbaDbLogShipping function to replace the mandatory $BackupNetworkPath with Azure Blob Storage upload backups logic but Im running into some issues:

Write-Message : The term 'Write-Message' is not recognized as the name of a cmdlet, function, script file, or operable program.
Test-FunctionInterrupt : The term 'Test-FunctionInterrupt' is not recognized as the name of a cmdlet, function, script file, or operable program.
Stop-Function : The term 'Stop-Function' is not recognized as the name of a cmdlet, function, script file, or operable program.
The property 'StatementTimeout' cannot be found on this object. Verify that the property exists and can be set.

To circumvent these errors, I copied/pasted them from the dbatools internal helper functions:
Write-Message
Stop-Function

but i ran into yet another issue with [Sqlcollaborative.Dbatools.dbaSystem...]
For example:

Unable to find type [Sqlcollaborative.Dbatools.dbaSystem.MessageLevel].

I tried importing the module Import-Module dbatools in the script before the Invoke-DbaDbLogShipping and that didnt help...




windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered Cataster-7485 commented

Hello,

Not sure about that script, but did you try passing SAS keys or Access keys or connection string ? Also easiest way will be looking port 445 to be open, usually it is.

Please go through the below links and see if connection strings are useful

https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string?toc=/azure/storage/blobs/toc.json

https://azure.microsoft.com/en-in/blog/microsoft-azure-block-blob-storage-backup/

--please don't forget to upvote and Accept as answer if the reply is helpful--

Thanks,

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@LimitlessTechnology-2700

[ERROR]: Port 445 is not reachable from this client, Exit the validation and please verify the network

0 Votes 0 ·