Remove-VBRBackupFile

In this article

    Short Description

    Removes missing backup files from the Veeam Backup & Replication configuration database.

    Important

    This cmdlet is available starting from Veeam Backup & Replication 11a (build 11.0.1.1261).

    Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

    Syntax

    This cmdlet provides parameter sets that allow you to:

    • Remove a missing backup file and all backup files related to it.  

    Remove-VBRBackupFile -BackupFile <VBRBackupFile> [-FromDisk] [-WhatIf] [-Confirm]  [<CommonParameters>]

    • Remove all backup files that are missing from a backup.

    Remove-VBRBackupFile -Backup <CBackup> [-FromDisk] [-WhatIf] [-Confirm]  [<CommonParameters>]

    Detailed Description

    This cmdlet removes missing backup files from the Veeam Backup & Replication configuration database.

    Parameters

    Parameter

    Description

    Type

    Required

    Position

    Accept Pipeline Input

    BackupFile

    Specifies a missing backup file that you want to remove.

    Accepts the VBRBackupFile object. To create this object, run the Get-VBRBackupFile cmdlet.

    True

    Named

    False

    Backup

    Specifies a backup from which you want to remove missing backup files.

    Accepts the CBackup object. To create this object, run the Get-VBRBackup cmdlet.

    True

    Named

    False

    FromDisk

    Defines that the cmdlet will remove the missing backup files from the configuration database and from disk (if these backup files are still available). If you do not provide this parameter, the cmdlet will remove missing backup files from the configuration database only.

    SwitchParameter

    False

    Named

    False

    WhatIf

    Defines that the cmdlet will write a message that describes the effects of running the cmdlet without actually performing any action.

    SwitchParameter

    False

    Named

    False

    Confirm

    Defines that the cmdlet will display a prompt that asks if you want to continue running the command.

    SwitchParameter

    False

    Named

    False

    <CommonParameters>

    This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

    Output Object

    None.

    Examples

    Remove-VBRBackupFileExample 1. Removing Missing Backup File

    This example shows how to remove a missing backup file and all backup files related to it from Veeam Backup & Replication configuration database.    

    $backup = Get-VBRBackup -Name "Daily backups"

    $missingfile = Get-VBRBackupFile -Backup $backup[4]

    Remove-VBRBackupFile -BackupFile $missingfile -Confirm

    Perform the following steps:

    1. Run the Get-VBRBackup cmdlet. Specify the Name parameter value. Save the result to the $backup variable.
    2. Run the Get-VBRBackupFile cmdlet. Specify the Backup parameter value. Save the result to the $missingfile variable.
    3. Run the Remove-VBRBackupFile cmdlet. Set the $missingfile variable as the BackupFile parameter value. Provide the Confirm parameter.

    Remove-VBRBackupFileExample 2. Removing all Missing Backup Files from Backup

    This example shows how to remove all backup files that are missing from a backup. The cmdlet will remove the missing backup files from the configuration database and from disk.

    $backup = Get-VBRBackup -Name "Daily backups"

    Remove-VBRBackupFile -Backup $backup -FromDisk

    Perform the following steps:

    1. Run the Get-VBRBackup cmdlet. Specify the Name parameter value. Save the result to the $backup variable.
    2. Run the Remove-VBRBackupFile cmdlet. Set the $missingfile variable as the BackupFile parameter value. Provide the FromDisk parameter.

    Related Commands