dbaclone icon indicating copy to clipboard operation
dbaclone copied to clipboard

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

Open blitzmann opened this issue 3 years ago • 5 comments

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.

blitzmann avatar Aug 13 '21 20:08 blitzmann

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.

DatKyle avatar Aug 18 '21 09:08 DatKyle

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.

blitzmann avatar Aug 20 '21 17:08 blitzmann

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

sanderstad avatar Aug 20 '21 20:08 sanderstad

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 :)

blitzmann avatar Aug 22 '21 02:08 blitzmann

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

fmms avatar Aug 11 '23 18:08 fmms