locked
Enabling Backup for Azure Stack via PowerShell RRS feed

  • Question

  • Folks,

    I want to test out Azure Stack backup on my ASDK.

    1. Is this supported? I ask because I thought there was no IP connectivity from the ASDK to the host, even via a UNC path.
    2. If I create a share on the host OS (for testing purposes) what share level permissions, file level permissions do I need to grant and to what role or account?

    Thanks

    Lisa.

    Monday, March 26, 2018 7:06 PM

Answers

  • Hello Lisa,

    To answer your questions.

     

    1.)Is this supported? I ask because I thought there was no IP connectivity from the ASDK to the host, even via a UNC path.  

    Yes, this is supported. You can set up a share on the host like:

    Example: $sharepath = "\\serverIP \c$\ClusterStorage\Volume1\Shares\SU1_Public\AzSBackup"

      

    2.)If I create a share on the host OS (for testing purposes) what share level permissions, file level permissions do I need to grant and to what role or account?

    See image below and also: Verify requirements for the Infrastructure Backup Service

     

    Let us know how it goes.

        

    We apologize for any inconvenience and appreciate your time and interest in Azure Stack.

    If you experience any issues with Azure Stack or the current ASDK release, please feel free to contact us.

                 

     Thanks


    Gary Gallanes


    Tuesday, March 27, 2018 5:55 PM
  • Hello Lisa,

    It appears there’s a typo in the Get-BackupLocation command.

    Try this:

    Get-AzsBackupLocation | Select-Object -Property $sharepath, $username, $password | ConvertTo-Json

     

    Can you test the path to your SMB file share?

    Example:

    test-path \\192.168.200.65\SU1_Public\AzSBackup

     

    -          If it runs ‘True’ – got to Run Infra Backup 

      

    -          If it runs ‘False

    -Open file explorer and paste in the following path (Make sure to set YOUR IP Address)

     

    Example: \\192.168.200.65\c$\ClusterStorage\Volume1\Shares\SU1_Public

      

    -Create a new folder and rename it ‘AzSBackup’

    - Right click the folder and share it, Add ‘Authenticated users and Full permissions.

    -Go back to PowerShell and test your new file share path.

      

    Example:

    test-path \\192.168.200.65\c$\ClusterStorage\Volume1\Shares\SU1_Public\AzSBackup

      

    Now you’ll need to reset the Backup share using the new file share path.

    Example:

    $encryptionkey = New-EncryptionKeyBase64

    $username = "AzureStack\AzureStackAdmin"

    $password = "Passw0rd1"

    $credential = New-Object System.Management.Automation.PSCredential`

    ($username, ($password| ConvertTo-SecureString -asPlainText -Force)) 

    $location = Get-AzsLocation

    $sharepath = "\\192.168.200.65\c$\ClusterStorage\Volume1' \Shares\SU1_Public\AzSBackup"

    Set-AzSBackupShare -Location $location.Name -Path $sharepath ' -UserName $credential.UserName -Password ` credential.GetNetworkCredential ().password -EncryptionKey $encryptionkey

           

      

    Run Infra Backup

    cd C:\tools\AzureStack-Tools-master

    Import-Module .\Connect\AzureStack.Connect.psm1

    Import-Module .\Infrastructure\AzureStack.Infra.psm1

    $location = Get-AzsLocation

    Start-AzSBackup -Location $location.Name

        

    Let us know how it goes.

     

    We apologize for any inconvenience and appreciate your time and interest in Azure Stack.

    If you experience any issues with Azure Stack or the current ASDK release, please feel free to contact us.

                 

     Thanks


    Gary Gallanes




    Wednesday, March 28, 2018 11:02 PM
  • Hello Lisa,

    To answer your questions:

      

    Question:

    However, I didn’t add that additional permission i.e. “Authenticated Users” Full Permissions. Is that bad?

     

    Answer:  Nope. It’s not required. The ‘Set-AzSBackupshare’ script will fail if it doesn’t have correct permissions. NOTE: Set-AzSBackupshare creates the ‘MASBackup’ folder in the share location. Check for the presents of the folder.  If it was created, your share a perms are good.

     

    Question:

    is this the expected output from running Test-Path (as I see some NULLs)?

     

    Answer: Yes, your output from Get- AzSBackupshare and Test-Path are both correct. NOTE: The nulls are expected as this is another doc bug.

      

    Let us know how it goes

       

    We apologize for any inconvenience and appreciate your time and interest in Azure Stack.

    If you experience any issues with Azure Stack or the current ASDK release, please feel free to contact us.

                 

     Thanks


    Gary Gallanes


    Thursday, April 5, 2018 12:32 AM
  • Hello Lisa,

    To answer your questions:

     

    Q: Are these files encrypted by the encryption key you generate?

    A:  YES

     

    Q: How can you inspect what is in these zip files.

    A: You can validate the back up job in the Admin Portal

    See: Confirm backup completed in the administration portal

     

    NOTE: 7-Zip can open most compressed files.

    -          -  Download & Install 7-Zip

    -          -  Open a Compressed zip file with 7-Zip

    -          -  You should be prompted for a password

    -          -  Use the encryption key for password

       

    We apologize for any inconvenience and appreciate your time and interest in Azure Stack.

    If you experience any issues with Azure Stack or the current ASDK release, please feel free to contact us.

                 

     Thanks


    Gary Gallanes

    Wednesday, April 11, 2018 11:17 PM

All replies

  • Hello Lisa,

    To answer your questions.

     

    1.)Is this supported? I ask because I thought there was no IP connectivity from the ASDK to the host, even via a UNC path.  

    Yes, this is supported. You can set up a share on the host like:

    Example: $sharepath = "\\serverIP \c$\ClusterStorage\Volume1\Shares\SU1_Public\AzSBackup"

      

    2.)If I create a share on the host OS (for testing purposes) what share level permissions, file level permissions do I need to grant and to what role or account?

    See image below and also: Verify requirements for the Infrastructure Backup Service

     

    Let us know how it goes.

        

    We apologize for any inconvenience and appreciate your time and interest in Azure Stack.

    If you experience any issues with Azure Stack or the current ASDK release, please feel free to contact us.

                 

     Thanks


    Gary Gallanes


    Tuesday, March 27, 2018 5:55 PM
  • Thanks for the reply Gary.

    Well I followed the various PowerShell scripts https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-backup-enable-backup-powershell and even seem to have made some successful edits but when I confirm backup all I get back is NULL fields. really thought I had it!

    1. Am I using the right account here i.e. AzureStack\AzureStackAdmin?
    2. Is the $sharepath value correct? I ask because the online doc has a much longer example that seems to include a partial FQDN.

    Lisa.

    Wednesday, March 28, 2018 11:43 AM
  • Hello Lisa,

    It appears there’s a typo in the Get-BackupLocation command.

    Try this:

    Get-AzsBackupLocation | Select-Object -Property $sharepath, $username, $password | ConvertTo-Json

     

    Can you test the path to your SMB file share?

    Example:

    test-path \\192.168.200.65\SU1_Public\AzSBackup

     

    -          If it runs ‘True’ – got to Run Infra Backup 

      

    -          If it runs ‘False

    -Open file explorer and paste in the following path (Make sure to set YOUR IP Address)

     

    Example: \\192.168.200.65\c$\ClusterStorage\Volume1\Shares\SU1_Public

      

    -Create a new folder and rename it ‘AzSBackup’

    - Right click the folder and share it, Add ‘Authenticated users and Full permissions.

    -Go back to PowerShell and test your new file share path.

      

    Example:

    test-path \\192.168.200.65\c$\ClusterStorage\Volume1\Shares\SU1_Public\AzSBackup

      

    Now you’ll need to reset the Backup share using the new file share path.

    Example:

    $encryptionkey = New-EncryptionKeyBase64

    $username = "AzureStack\AzureStackAdmin"

    $password = "Passw0rd1"

    $credential = New-Object System.Management.Automation.PSCredential`

    ($username, ($password| ConvertTo-SecureString -asPlainText -Force)) 

    $location = Get-AzsLocation

    $sharepath = "\\192.168.200.65\c$\ClusterStorage\Volume1' \Shares\SU1_Public\AzSBackup"

    Set-AzSBackupShare -Location $location.Name -Path $sharepath ' -UserName $credential.UserName -Password ` credential.GetNetworkCredential ().password -EncryptionKey $encryptionkey

           

      

    Run Infra Backup

    cd C:\tools\AzureStack-Tools-master

    Import-Module .\Connect\AzureStack.Connect.psm1

    Import-Module .\Infrastructure\AzureStack.Infra.psm1

    $location = Get-AzsLocation

    Start-AzSBackup -Location $location.Name

        

    Let us know how it goes.

     

    We apologize for any inconvenience and appreciate your time and interest in Azure Stack.

    If you experience any issues with Azure Stack or the current ASDK release, please feel free to contact us.

                 

     Thanks


    Gary Gallanes




    Wednesday, March 28, 2018 11:02 PM
  • Thanks Gary.

    So Test-Path on my original location came back as false. I edited the script and included those three variables (note this was a copy from the previous URL and so you might want to let the Tech Writer know). I amended the path as you advised and Test-Path returned true.

    However, I didn’t add that additional permission i.e. “Authenticated Users” Full Permissions. Is that bad?

    Also, is this the expected output from running Test-Path (as I see some NULLs)?

    Lisa.


    • Edited by LisaLow Thursday, March 29, 2018 1:24 PM typo
    Thursday, March 29, 2018 1:24 PM
  • Hello Lisa,

    To answer your questions:

      

    Question:

    However, I didn’t add that additional permission i.e. “Authenticated Users” Full Permissions. Is that bad?

     

    Answer:  Nope. It’s not required. The ‘Set-AzSBackupshare’ script will fail if it doesn’t have correct permissions. NOTE: Set-AzSBackupshare creates the ‘MASBackup’ folder in the share location. Check for the presents of the folder.  If it was created, your share a perms are good.

     

    Question:

    is this the expected output from running Test-Path (as I see some NULLs)?

     

    Answer: Yes, your output from Get- AzSBackupshare and Test-Path are both correct. NOTE: The nulls are expected as this is another doc bug.

      

    Let us know how it goes

       

    We apologize for any inconvenience and appreciate your time and interest in Azure Stack.

    If you experience any issues with Azure Stack or the current ASDK release, please feel free to contact us.

                 

     Thanks


    Gary Gallanes


    Thursday, April 5, 2018 12:32 AM
  • Gary, I just wanted to let you know that I got a successful backup. I tried opening one of the compressed zip files but they don't seem to want to open. Are these files encrypted by the encryption key you generate? How can you inspect what is in these zip files.

    Lisa

    Monday, April 9, 2018 7:50 PM
  • Hello Lisa,

    To answer your questions:

     

    Q: Are these files encrypted by the encryption key you generate?

    A:  YES

     

    Q: How can you inspect what is in these zip files.

    A: You can validate the back up job in the Admin Portal

    See: Confirm backup completed in the administration portal

     

    NOTE: 7-Zip can open most compressed files.

    -          -  Download & Install 7-Zip

    -          -  Open a Compressed zip file with 7-Zip

    -          -  You should be prompted for a password

    -          -  Use the encryption key for password

       

    We apologize for any inconvenience and appreciate your time and interest in Azure Stack.

    If you experience any issues with Azure Stack or the current ASDK release, please feel free to contact us.

                 

     Thanks


    Gary Gallanes

    Wednesday, April 11, 2018 11:17 PM