Storage zones controller

Recover a primary storage zones controller configuration

Important:

Storage zones controller provides these options for disaster recovery when a primary storage zones controller is deleted or fails:

  • If a secondary storage zones controller is available, promote the secondary controller to a primary one.
  • If a secondary storage zones controller is not available and you backed up your primary storage zones controller configuration (as described in Back up a primary storage zones controller configuration), recover the primary storage zones controller from the backup file.
  • If you do not have a backup of your primary storage zones controller configuration and all of your storage zones controllers are accidentally deleted or become unusable, only partial recovery is possible. You can recover zones and the configuration for storage zones for ShareFile Data, but not storage zones connectors.

To recover a primary storage zones controller from a backup file

Note:

These steps apply only to a primary storage zones controller. To recover a secondary storage zones controller, reinstall the storage zones controller on the server and then join the server to the primary storage zones controller.

  1. The PowerShell script used in this procedure is unsigned, so it might be necessary 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 https://docs.microsoft.com/en-us/sysinternals/downloads/psexec 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
       <!--NeedCopy-->
      
    • If using a named user for the storage zones controller application pool:

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

    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 are required to 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 storage zones 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 storage zones controller.

    • fullpath is the backup file location and name. For example, c:\szc-backup.bak.

To recover a primary storage zones controller without a backup file

If you do not have a backup file, you can recover zones and the configuration for storage zones for ShareFile Data, but not storage zones 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 storage zones 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 are required to 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 support Azure or Amazon S3 storage. 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]
    <!--NeedCopy-->
    

    Where:

    • ZoneID can be obtained as follows:
      1. In the ShareFile web interface, click Admin > Storage zones, 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 > storage zones, click the site name, right-click the host name, 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 storage zones for ShareFile Data are enabled for the zone.
    • StorageUsername and StoragePassword are needed only if storage zones for ShareFile Data are enabled for the zone and your storage location requires authentication.
    • AzureAccountName, AzureAccessKey, and AzureContainerName are needed only if storage zones for ShareFile Data are stored in a Windows Azure storage container.
  4. To recover storage zones connectors, use the storage zones controller console (http://localhost/configservice/login.aspx) to enable and configure connectors.

Recover a primary storage zones controller configuration