Recover files and folders from your ShareFile Data backup
The ShareFile Administrator console enables you to browse your storage zones 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, see the PowerShell scripts and commands inStorage zones controller system requirements.
Prerequisites
- Complete the setup and testing described inPrepare storage zones controller for file recovery. The setup includes instructions for creating a folder to contain the recovered files.
In the ShareFile web interface, clickAdminand then clickStorage zones.
Click the zone name and then clickRecoverFiles.
Click in theRecovery Datetext box and select a date and time.
The file list for the storage zone on the specified date and time appears.
Select the check box for each file to restore and then click Restore.
选择恢复文件包含一个文件夹d 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 storage zone 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.
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.
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 storage zones controller application pool:
PsExec.exe -i -u "domain\username" C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell
A PowerShell window opens.
Recover the file:
Open a Command Prompt window as administrator.
Navigate to the location of PsExec.exe and enter:
PsExec.exe -i -u "NT AUTHORITY\NetworkService" C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell
In the PowerShell window, navigate to:
cd
C:\inetpub\wwwroot\Citrix\StorageCenter\Tools\Disaster Recovery
Run the recovery script:
.\DoRecovery.ps1
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 storage zones 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.