PowerShell script exchange
Post Reply
dhep
Lurker
Posts: 2
Liked: never
Joined: Sep 26, 2011 1:20 pm
Full Name: Duncan Hepple
Contact:

Script telling Veeam to remove backups in specific repositor

Post by dhep »

Hi guys,

Really need some help with this if possible. I'm trying to get ArcServe to execute a Powershell script once a tape backup is complete to tell Veeam to remove it's backups depending on the Repository.

remove-vbrbackup | where {get-VBRBackupRepository | where {$_.Name -eq "repositoryname"}}

however this command then asks me which Backup I want to remove, rather than deleting any backup in that repository. Please note that I want the jobs to remain, so that they can start writing new backup files the day after. We aim to use Veeam to stage our backups to disk and then use ArcServe r16 to archive these images onto Virtual Tape Library and then physical media on the Saturday night. I've set all our jobs on Veeam to start full backups on the Sunday (with standard increments on the weekdays). Can anyone please help?
Sethbartlett
Veteran
Posts: 282
Liked: 26 times
Joined: Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett
Contact:

Re: Script telling Veeam to remove backups in specific repos

Post by Sethbartlett »

Try this:

Code: Select all

Remove-VBRBackup |? {$_.GetTargetRepository() -eq (Get-VBRBackupRepository | ?{$_.name -eq "RepositoryName"})}
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
ThomasMc
Veteran
Posts: 293
Liked: 19 times
Joined: Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell
Contact:

Re: Script telling Veeam to remove backups in specific repos

Post by ThomasMc »

Or this :)

Code: Select all

Get-VBRBackup | ?{$_.GetTargetRepository().Name -eq "RepositoryName"} | Remove-VBRBackup -WhatIf
Add in -FromDisk and -Confirm:$false if needed
guidoakd
Influencer
Posts: 24
Liked: never
Joined: May 06, 2016 3:44 pm
Full Name: Guido G
Contact:

[MERGED] Script to "Delete Backup from Disk" ??

Post by guidoakd »

Hi everybody, i'am using Veeam Backup and Replication to get backups from disk to tapes, but i have the following issue, that may be someone can help me to solve.

I'm doing backup from my Exchange environment on disk every Saturdays, sizing 1.4TB on a disk with 2TB. On monday, i'm sending that backup to tape, but i keep also on disk until Friday, in case of someone decides to restore a mail inmediately. The thing is.. on that Friday, i would like to DELETE automatically from Veeam that backup on disk, in order to get the new full on the following Saturday (you will note i don't have space to make another full on that LUN). If i delete it manually from the disk, the job fails, because is expecting a full backup to do the incremental (is "still" on Veeam but not in the disk). But if i delete from Veeam Console, of course it works, because there is nothing and the job make the new Full. The question would be that... how can i automate that procedure, something that "delete" the backup from disk inside the Veeam console. Powershell? cmd? Sql?

This cames because last friday i've forgot to delete it from veeam console, and the jobs failed on weekend because of no space on disk :P

Thank u very much.. i hope u understood me.

=)
PTide
Product Manager
Posts: 6551
Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Script telling Veeam to remove backups in specific repos

Post by PTide »

Hi,

You can utilize this PS cmdlet. Please review the thread to see some script examples.

Thanks
guidoakd
Influencer
Posts: 24
Liked: never
Joined: May 06, 2016 3:44 pm
Full Name: Guido G
Contact:

Re: Script telling Veeam to remove backups in specific repos

Post by guidoakd »

Thank u very much! It worked fine with the links you gave me.

=)
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests