Product Documentation

Recover a primary StorageZones Controller configuration

Dec 22, 2015

StorageZones Controller provides these options for disaster recovery when a primary StorageZones Controller is deleted or becomes unusable:

  • If a secondary StorageZones Controller is available, promote the secondary controller to a primary one.
  • If a secondary StorageZones Controller is not available and you backed up your primary StorageZones Controller configuration (as described in Back up a primary StorageZones Controller configuration), recover the primary StorageZones Controller from the backup file.
  • If you do not have a backup of your primary StorageZones Controller configuration and all of your StorageZones Controllers are accidentally deleted or become unusable, only a partial recovery is possible. You can recover zones and the configuration for StorageZones for ShareFile Data, but not StorageZone Connectors.
Important: Be sure to use PowerShell 4.0 for this procedure. For more information about PowerShell requirements, refer to PowerShell scripts and commands in StorageZones Controller system requirements.

To recover a primary StorageZones Controller from a backup file

Note: These steps apply only to a primary StorageZones Controller. To recover a secondary StorageZones Controller, reinstall StorageZones Controller on the server and then join the server to the primary StorageZones Controller.
  1. The PowerShell script used in this procedure is unsigned, so you might need to change your PowerShell execution policy.
    1. Determine if your PowerShell execution policy allows you to run local, unsigned scripts: PS C:\>Get-ExecutionPolicy

      For example, a policy of RemoteSigned, Unrestricted, or Bypass allows you to run unsigned scripts.

    2. To change your PowerShell execution policy: PS C:\>Set-ExecutionPolicy RemoteSigned
  2. Set the user context for this PowerShell session. In a command window, run one of the following commands.
    Note: Download PsExec.exe from http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx and follow the installation instructions on that page.
    • If using the default Network Service account:

      PsExec.exe -i -u "NT AUTHORITY\NetworkService" C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell

    • If using a named user for the StorageZones Controller application pool:

      PsExec.exe -i -u "domain\username" C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell

    A PowerShell window opens.
  3. From the PowerShell prompt, import the module ConfigBR.dll: Import-Module "C:\inetpub\wwwroot\Citrix\StorageCenter\Tools\SfConfigBR\ConfigBR.dll"

    You must import the module each time you open a new PowerShell window.

  4. From the PowerShell prompt, run the Set-SfConfig command: Set-SfConfig -PrimaryZoneController "server" -Passphrase "passphrase" -FilePath "fullpath"

    where:

    • server is the primary StorageZones Controller server name or IP address. It can be in any of the following forms and must include the trailing slash.

      http://localhost/ConfigService/

      servername/ or serverip/ (if you use http)

      http[s]://servername.domain.com/ConfigService/

      http[s]://serverip/ConfigService/

    • passphrase is the one specified for StorageZones Controller.
    • fullpath is the backup file location and name. For example, c:\szc-backup.bak.

To recover a primary StorageZones Controller without a backup file

If you do not have a backup file, you can recover zones and the configuration for StorageZones for ShareFile Data, but not StorageZone Connectors.

  1. Set the user context for this PowerShell session. In a command window, run one of the following commands.
    • If using the default Network Service account:

      PsExec.exe -i -u "NT AUTHORITY\NetworkService" C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell

    • If using a named user for the StorageZones Controller application pool:

      PsExec.exe -i -u "domain\username" C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell

    A PowerShell window opens.
  2. From the PowerShell prompt, import the module ConfigBR.dll: Import-Module "C:\inetpub\wwwroot\Citrix\StorageCenter\Tools\SfConfigBR\ConfigBR.dll"

    You must import the module each time you open a new PowerShell window.

  3. From the PowerShell prompt, run the Join-SfConfig command:
    Important: The Join-SfConfig command currently does not work with Azure or Amazon S3 storage. Please contact ShareFile support if you need to use this command.
    Join-SfConfig -ShareFileUserName "ShareFileUserName" -ShareFilePassword "ShareFilePassword" -subdomain "subdomain.sharefile.com" -ZoneId "ZoneId" -SCID "StorageCenterId" -Passphrase "passphrase" [-StorageZoneLocation "StorageZoneLocation"] [-StorageUsername "StorageUserName"] [-Storagepass "StoragePassword"] [-AzureAccountName "StorageAccount"] [-AzureSecretKey "PrimaryOrSecondaryAccessKey"] [-AzureContainerName "Container"] [-S3AccessKey "S3AccessKey"] [-S3SecretKey "S3SecretKey"] [-S3ContainerName "S3ContainerName"] [-S3EndpointAddress "S3EndpointAddress"] [-S3ForcePathStyle]

    where:

    • ZoneID can be obtained as follows:
      1. In the ShareFile web interface, click Admin > StorageZones, right-click the site name, and then choose Properties.

        The address displayed ends with the zone ID that looks like this: zae4fb8c-8520-478f-8f87-aa589a8fd181.

      2. Copy and paste that ID into the Join-SfConfig command.
    • StorageCenterId can be obtained as follows:
      1. In the ShareFile web interface, click Admin > StorageZones, click the site name, right-click the hostname, and then choose Properties.

        The address displayed ends with the storage ID that looks like this: scd344cf-8043-4ce2-974b-8f9cd83e2978.

      2. Copy and paste that ID into the Join-SfConfig command.
    • StorageZoneLocation is needed only if StorageZones for ShareFile Data is enabled for the zone.
    • StorageUsername and StoragePassword are needed only if StorageZones for ShareFile Data is enabled for the zone and your storage location requires authentication.
    • AzureAccountName, AzureAccessKey, and AzureContainerName are needed only if StorageZones for ShareFile Data is stored in a Windows Azure storage container.
  4. To recover StorageZone Connectors, use the StorageZones Controller console (http://localhost/configservice/login.aspx) to enable and configure Connectors.