-
- Influencer
- Posts: 12
- Liked: never
- Joined: Feb 03, 2015 6:53 am
- Full Name: Daniel Rogers
- Contact:
Forget unavailable backups via powershell?
Hello!
Just wondering if it is possible to trigger the 'Forget -> All unavailable backups' via powershell.
- I am using Veeam Agent for Windows
- Only performing 1 backup per week (FULL)
- Only wish to keep 1 week retention
- Powershell script runs weekly to delete files across the repo -le 7 days
- Kicks off a Rescan-VBREntity -AllRepositories afterwards to update the restore points as unavailable
It would be nice and clean if they could be forgotten/removed completely within the same process.
This is the manual documentation for the process: https://helpcenter.veeam.com/docs/backu ... tml?ver=95
Any ideas?
Just wondering if it is possible to trigger the 'Forget -> All unavailable backups' via powershell.
- I am using Veeam Agent for Windows
- Only performing 1 backup per week (FULL)
- Only wish to keep 1 week retention
- Powershell script runs weekly to delete files across the repo -le 7 days
- Kicks off a Rescan-VBREntity -AllRepositories afterwards to update the restore points as unavailable
It would be nice and clean if they could be forgotten/removed completely within the same process.
This is the manual documentation for the process: https://helpcenter.veeam.com/docs/backu ... tml?ver=95
Any ideas?
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Forget unavailable backups via powershell?
You can remove unavailable backups from configuration, using Remove-VBRBackup cmdlet.
-
- Influencer
- Posts: 12
- Liked: never
- Joined: Feb 03, 2015 6:53 am
- Full Name: Daniel Rogers
- Contact:
Re: Forget unavailable backups via powershell?
Hi Vladimir,
Thanks for replying. I saw that command but it will remove ALL the backups point. I wanted to run it in between the backup to disk and the tape kicking off to ensure it only writes the latest backup. That is a configurable option for the Veeam tape jobs but I don't know if it works 100%.
I might run Remove-VBRBackup across the Agent jobs pre-backup so it only makes one point anyway. Thanks!
Thanks for replying. I saw that command but it will remove ALL the backups point. I wanted to run it in between the backup to disk and the tape kicking off to ensure it only writes the latest backup. That is a configurable option for the Veeam tape jobs but I don't know if it works 100%.
I might run Remove-VBRBackup across the Agent jobs pre-backup so it only makes one point anyway. Thanks!
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Forget unavailable backups via powershell?
Are you saying that even if you specify for Remove-VBRBackup only unavailable backup entities, the cmdlet will still remove whole backup chain?
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Oct 07, 2022 2:49 pm
- Full Name: Francois Guilbaud
- Contact:
Re: Forget unavailable backups via powershell?
Hi,
It's been 5 years since the last message, but problem is still on.
If I use Remove-VBRBAckup with option "FromDBIfSPUnavailable" (option "FromDisk " is mandatory to use it), it will delete all the backup chain.
I have not found any powershell command to "forget all unavailable restore points". The only way I found is to run it through the application.
François.
It's been 5 years since the last message, but problem is still on.
If I use Remove-VBRBAckup with option "FromDBIfSPUnavailable" (option "FromDisk " is mandatory to use it), it will delete all the backup chain.
I have not found any powershell command to "forget all unavailable restore points". The only way I found is to run it through the application.
François.
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Forget unavailable backups via powershell?
Hi François,
Have a look at Remove-VBRBackupFile cmdlet available starting from v11a.
Best regards,
Oleg
Have a look at Remove-VBRBackupFile cmdlet available starting from v11a.
Best regards,
Oleg
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Oct 07, 2022 2:49 pm
- Full Name: Francois Guilbaud
- Contact:
Re: Forget unavailable backups via powershell?
Hi Oleg,
Thanks so much, this is the command I needed, how could I miss it when I read the doc?! Looking for documentation a Friday afternoon was not a good idea
Anyway, here is the codeI used to forget unavailable backups (if it can help any veeam user) :
Once again, thanks a lot, and have a nice week-end.
Regards.
Thanks so much, this is the command I needed, how could I miss it when I read the doc?! Looking for documentation a Friday afternoon was not a good idea
Anyway, here is the codeI used to forget unavailable backups (if it can help any veeam user) :
Code: Select all
Get-VBRBackup -Name "<NAME OF THE BACKUP>" | Get-VBRBackupFile | ?{$_.IsAvailable -eq $false} | %{
Remove-VBRBackupFile -backupFile $_ -Confirm:$false
}
Regards.
Who is online
Users browsing this forum: No registered users and 5 guests