Skip to content
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

Warning when using New-DcnImage -ImageLocalPath: Please enter the network path where to save the images #135

Open
blitzmann opened this issue Aug 13, 2021 · 5 comments

Comments

@blitzmann
Copy link
Contributor

Describe the bug
When trying to create an image, using the example:

New-DcnImage -SourceSqlInstance SQLDB1 -DestinationSqlInstance SQLDB2 -ImageLocalPath C:\Temp\images\ -Database DB1 -CreateFullBackup

I get the following error:

WARNING: [16:36:04][New-DcnImage] Please enter the network path where to save the images

To Reproduce
Ran the above example from the documentation, substituting my own values of course.

@DatKyle
Copy link

DatKyle commented Aug 18, 2021

I've had a look and resolved the warning, but I've run into some logic I'm not sure about.
The logic here tries to convert the Network Path into a local path, which is already provided. I'm unsure if it should be doing the opposite to determine the network path or skip the network path completely.

@blitzmann
Copy link
Contributor Author

Yeah I also looked and couldn't make out what it's supposed to do. Part of me thinks it's supposed to represent the local path with respect to the server... but who knows.

@sanderstad
Copy link
Collaborator

When I developed the module there was some challenges when creating the images over network paths. That's the reason I convert the network path to a local path.
It is the local path of the server/computer where the images are saved

@blitzmann
Copy link
Contributor Author

And that kind of makes sense, but the example still doesn't work out of the box. I also believe that should be clarified in the documentation :)

@fmms
Copy link

fmms commented Aug 11, 2023

just hit the same issue just trying to discover the module.

I believe it would be good if the documentation had an example that just works locally on the SQL server. To not have to setup WinRM, Remoting etc. In the PowerShell integrated docs it seems quiet easy...

get-help New-DcnImage -examples

NAME
    New-DcnImage

SYNOPSIS
    New-DcnImage creates a new image


    -------------------------- EXAMPLE 1 --------------------------

    PS C:\>New-DcnImage -SourceSqlInstance SQLDB1 -DestinationSqlInstance SQLDB2 -ImageLocalPath C:\Temp\images\ -Database DB1 -CreateFullBackup

    Create an image for databas DB1 from SQL Server SQLDB1. The temporary destination will be SQLDB2.
    The image will be saved in C:\Temp\images.




    -------------------------- EXAMPLE 2 --------------------------

    PS C:\>New-DcnImage -SourceSqlInstance SQLDB1 -DestinationSqlInstance SQLDB2 -ImageLocalPath C:\Temp\images\ -Database DB1 -UseLastFullBackup

    Create an image from the database DB1 on SQLDB1 using the last full backup and use SQLDB2 as the temporary database server.
    The image is written to c:\Temp\images

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

No branches or pull requests

4 participants