Backup Exec Management Command Line Interface Help
Submit-BEFileSystemRestoreJob Cmdlet
Synopsis

Submits a file system restore job in Backup Exec.

Syntax
Submit-BEFileSystemRestoreJob -AgentServer [<BEAgentServer>] [-FileSystemSelection] [<BEFileSystemSelection[]>] [-PreCommand [<String>]] [-PostCommand [<String>]] [-PrePostCommandSuccessfulIfReturnsZero [<Boolean>]] [-SubmitOnHold [<Boolean>]] [-StartDate [<DateTime>]] [-Priority {Normal | Lowest | Low | High | Highest}] [-AutomaticallyDeleteJob {Never | IfSuccessful | WhenComplete}] [-RunCommandLocation {OnEachAgentServer | OnBackupExecServer}] [-Storage [<BEStorage>]] [-CancelPrePostCommandIfNotCompleteWithinMinutes [<UInt32>]] [-RunJobOnlyIfPreCommandIsSuccessful [<Boolean>]] [-RunPostCommandOnlyIfPreCommandIsSuccessful [<Boolean>]] [-RunPostCommandEvenIfJobIsUnsuccessful [<Boolean>]] [-RedirectToVirtualDiskFileName [<String>]] [-RestoreCorruptFile [<Boolean>]] [-RestoreDirectoryStructure [<Boolean>]] [-RedirectToVirtualDisk {None | VHD}] [-NotBefore [<DateTime>]] [-RedirectToPath [<String>]] [-RedirectToPathLogonAccount [<BELogonAccount>]] [-RestoreJunctionPoint [<Boolean>]] [-Name [<String>]] [-PointInTime [<DateTime>]] [-RestoreDiskQuotaData [<Boolean>]] [-OverwriteExistingFile {IfExistingIsOlder | No | Yes}] [-RestoreSecurityInformation {FilesAndNtfsPermissions | NtfsPermissionsOnly | FilesOnly}] [-RestoreRemovableStorageData [<Boolean>]] [-WhatIf [<SwitchParameter>]] [-Confirm [<SwitchParameter>]] [<CommonParameters>]

Submit-BEFileSystemRestoreJob -JobHistory [<BEJobHistory>] [-FileSystemSelection] [<BEFileSystemSelection[]>] [-PreCommand [<String>]] [-PostCommand [<String>]] [-PrePostCommandSuccessfulIfReturnsZero [<Boolean>]] [-Priority {Normal | Lowest | Low | High | Highest}] [-AutomaticallyDeleteJob {Never | IfSuccessful | WhenComplete}] [-SubmitOnHold [<Boolean>]] [-RunJobOnlyIfPreCommandIsSuccessful [<Boolean>]] [-RunCommandLocation {OnEachAgentServer | OnBackupExecServer}] [-Storage [<BEStorage>]] [-RunPostCommandOnlyIfPreCommandIsSuccessful [<Boolean>]] [-RunPostCommandEvenIfJobIsUnsuccessful [<Boolean>]] [-CancelPrePostCommandIfNotCompleteWithinMinutes [<UInt32>]] [-RedirectToVirtualDisk {None | VHD}] [-RedirectToVirtualDiskFileName [<String>]] [-RestoreCorruptFile [<Boolean>]] [-StartDate [<DateTime>]] [-RedirectToPath [<String>]] [-RedirectToPathLogonAccount [<BELogonAccount>]] [-RestoreDirectoryStructure [<Boolean>]] [-RestoreDiskQuotaData [<Boolean>]] [-RestoreJunctionPoint [<Boolean>]] [-Name [<String>]] [-OverwriteExistingFile {IfExistingIsOlder | No | Yes}] [-RestoreSecurityInformation {FilesAndNtfsPermissions | NtfsPermissionsOnly | FilesOnly}] [-RestoreRemovableStorageData [<Boolean>]] [-WhatIf [<SwitchParameter>]] [-Confirm [<SwitchParameter>]] [<CommonParameters>]
Description

Submits a file system restore job in Backup Exec.

You can specify a Backup Exec job history object as the point-in-time in the backup set for the restore.

You can also specify a point-in-time range to determine the point-in-time in the backup set for the restore.

Parameters

-FileSystemSelection <BEFileSystemSelection[]>

Includes or excludes one or more file system selections in the backup definition. To specify files or directories to include, specify one or more paths using commas to separate the values. To specify files or directories to exclude, use the output of New-BEFileSystemSelection with the -Exclude parameter.


Required true
Position 1
Accepts pipeline input false
Accepts wildcard characters false


-RedirectToPath <String>

Specifies the path to restore to for a redirected restore job.


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-RedirectToPathLogonAccount <BELogonAccount>

Specifies a Backup Exec logon account for the redirected restore job.


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-RedirectToVirtualDisk

Redirects the restore job to a virtual disk. RedirectToPath must be specified.

The valid values are:
None
VHD


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-RedirectToVirtualDiskFileName <String>

Specifies the name of the virtual disk to redirect the restore job. If not specified, a VHD is created for each backup set in the restore job. The RedirectToVirtualDisk parameter must be set to VHD.


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-RestoreCorruptFile <Boolean>

Restores corrupted files.

The valid values are:
$true
$false


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-RestoreDirectoryStructure <Boolean>

Restores a file system directory structure.

The valid values are:
$true
$false


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-OverwriteExistingFile

Overwrites any existing file during the restore.

The valid values are:
IfExistingIsOlder
No
Yes


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-RestoreSecurityInformation

Restores security information.

The valid values are:
FilesAndNtfsPermissions
NtfsPermissionsOnly
FilesOnly


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-RestoreRemovableStorageData <Boolean>

Restores removable storage data.

The valid values are:
$true
$false


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-RestoreDiskQuotaData <Boolean>

Restores disk quota data.

The valid values are:
$true
$false


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-RestoreJunctionPoint <Boolean>

Restores junction points.

The valid values are:
$true
$false


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-Name <String>

Specifies the name of the restore job.


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-AgentServer <BEAgentServer>

Specifies the server from which the data was backed up.


Required true
Position Named
Accepts pipeline input true (ByValue)
Accepts wildcard characters false


-PointInTime <DateTime>

Specifies up to a point in time in the backup set to restore.


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-NotBefore <DateTime>

Specifies a starting point in time in the backup set to restore.


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-JobHistory <BEJobHistory>

Specifies the job history object referencing the backup set.


Required true
Position Named
Accepts pipeline input true (ByValue)
Accepts wildcard characters false


-StartDate <DateTime>

Indicates when the job should start. If you do not specify this parameter, the job starts immediately.


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-Priority

Specifies the order that the job runs. If two jobs are scheduled to run at the same time, the priority you set determines which job runs first.

The valid values are:
Normal
Lowest
Low
High
Highest


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-AutomaticallyDeleteJob

Deletes the job automatically when it completes.

The valid values are:
Never
IfSuccessful
WhenComplete


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-SubmitOnHold <Boolean>

Submits the job with an on-hold status.

The valid values are:
$true
$false


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-PreCommand <String>

Specifies a command to run before the backup job.


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-PostCommand <String>

Specifies a command to run after the backup job.


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-PrePostCommandSuccessfulIfReturnsZero <Boolean>

Allows Backup Exec to check the return codes of the pre- and post-commands to determine if they completed successfully.

The valid values are:
$true
$false


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-RunJobOnlyIfPreCommandIsSuccessful <Boolean>

Runs the backup job only if the pre-command is successful. If the pre-command fails, the job does not run.

The valid values are:
$true
$false


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-RunPostCommandOnlyIfPreCommandIsSuccessful <Boolean>

Runs the post-command only if the pre-command is successful.

The valid values are:
$true
$false


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-RunPostCommandEvenIfJobIsUnsuccessful <Boolean>

Runs the post-command regardless of whether the job is successful or not.

The valid values are:
$true
$false


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-CancelPrePostCommandIfNotCompleteWithinMinutes <UInt32>

Designates the number of minutes Backup Exec should wait before canceling a pre- or post-command that did not complete.


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-RunCommandLocation

Determines the location where the pre- and post-command run.

The valid values are:
OnEachAgentServer
OnBackupExecServer


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-Storage <BEStorage>

Specifies the storage device that you want to use for a restore job. See Get-BEStorage.


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-WhatIf <SwitchParameter>

Describes what happens if you execute the command without actually executing the command.


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


-Confirm <SwitchParameter>

Prompts you for confirmation before executing the command.


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


<CommonParameters>

For more information about common parameters, type "Get-Help about_commonparameters".

Input Types
BackupExec.Management.CLI.BEAgentServer

You can pipe in a Backup Exec agent server object into Submit-BEFileSystemRestoreJob.



BackupExec.Management.CLI.BEJobHistory

You can pipe in a Backup Exec job history object into Submit-BEFileSystemRestoreJob.

Return Value
BackupExec.Management.CLI.BEJob

Submit-BEFileSystemRestoreJob returns a Backup Exec job object.

Examples

Example 1

C:\PS> Get-BEJob "Job 0001" | Get-BEJobHistory -FromLastJobRun | Submit-BEFileSystemRestoreJob -FileSystemSelection C:\BackedUpData\*.*

These commands restore a directory named C:\BackedUpData from the most recent run of a job named "Job 0001".


Example 2
C:\PS> Get-BEAgentServer myserver.mycompany.com | Submit-BEFileSystemRestoreJob -FileSystemSelection C:\BackedUpData\*.*

These commands restore a directory named C:\BackedUpData from the most recent backup of a server named "myserver.mycompany.com".

Related Links

New-BEFileSystemSelection
Get-BEStorage
Get-BEJob
Get-BEJobHistory
Get-BEAgentServer