Recover files and folders from your ShareFile Data backup
The ShareFile Administrator console enables you to browse your StorageZones for ShareFile Data records for a particular date and time and tag any files and folders that you want to restore. ShareFile adds the tagged items to a recovery queue. You can then run the provided script to restore the files from a backup to the storage location.
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.
- Complete the setup and testing described in Prepare StorageZones Controller for file recovery. The setup includes instructions for creating a folder to contain the recovered files.
In the ShareFile web interface, click Admin and then click StorageZones.
Click the zone name and then click Recover Files.
Click in the Recovery Date text box and select a date and time.
The file list for the StorageZone on the specified date and time appears.
Select the check box for each file to restore and then click Restore.
Select the folder to contain the restored files and then click Restore.
The Folder list shows a spinning icon to indicate that the recovery is in process.
If your backup location does not follow the same layout as the StorageZone persistent storage, copy the files from the backup location to the location you specified when editing DoRecovery.ps1.
The DoRecovery.ps1 PowerShell script is unsigned, so you might need to change your PowerShell execution policy for this procedure.
1. Determine if your PowerShell execution policy allows you to run local, unsigned scripts. In a PowerShell window: Get-ExecutionPolicy
For example, a policy of RemoteSigned, Unrestricted, or Bypass allows you to run unsigned scripts.
2. To change your PowerShell execution policy: Set-ExecutionPolicy RemoteSigned
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.
Recover the file:
1. Open a Command Prompt window as administrator.
2. Navigate to the location of PsExec.exe and enter:
PsExec.exe -i -u "NT AUTHORITY\\NetworkService" C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell
3. In the PowerShell window, navigate to:
cd 'C:\\inetpub\\wwwroot\\Citrix\\StorageCenter\\Tools\\Disaster Recovery'
4. Run the recovery script:
The PowerShell window will include the message “Item recovered”. Recovered files are copied from the backup to the persistent storage location. After you refresh the console, the spinning icons disappear from the ShareFile web interface for files successfully recovered.
If a file that is deleted from the ShareFile web application has not yet been deleted by the StorageZones Controller delete service, the file is still in the persistent storage location. In that case, file recovery is immediate and a spinning icon does not appear in the ShareFile web interface.
If you cannot recover a file, refer to the help file provided in the Disaster Recovery folder.