Script telling Veeam to remove backups in specific repositor

PowerShell script exchange

Script telling Veeam to remove backups in specific repositor

Veeam Logoby dhep » Sat Feb 04, 2012 12:25 pm

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?
dhep
Lurker
 
Posts: 2
Liked: never
Joined: Mon Sep 26, 2011 1:20 pm
Full Name: Duncan Hepple

Re: Script telling Veeam to remove backups in specific repos

Veeam Logoby Sethbartlett » Sat Feb 04, 2012 10:58 pm

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.
Sethbartlett
Expert
 
Posts: 282
Liked: 25 times
Joined: Wed Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett

Re: Script telling Veeam to remove backups in specific repos

Veeam Logoby ThomasMc » Mon Feb 06, 2012 9:33 am

Or this :)

Code: Select all
Get-VBRBackup | ?{$_.GetTargetRepository().Name -eq "RepositoryName"} | Remove-VBRBackup -WhatIf


Add in -FromDisk and -Confirm:$false if needed
ThomasMc
Expert
 
Posts: 293
Liked: 17 times
Joined: Wed Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell

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

Veeam Logoby guidoakd » Thu Nov 10, 2016 4:26 pm

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.

=)
guidoakd
Influencer
 
Posts: 18
Liked: never
Joined: Fri May 06, 2016 3:44 pm
Full Name: Guido G

Re: Script telling Veeam to remove backups in specific repos

Veeam Logoby PTide » Thu Nov 10, 2016 4:47 pm

Hi,

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

Thanks
PTide
Veeam Software
 
Posts: 3248
Liked: 272 times
Joined: Tue May 19, 2015 1:46 pm

Re: Script telling Veeam to remove backups in specific repos

Veeam Logoby guidoakd » Thu Nov 10, 2016 9:28 pm

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

=)
guidoakd
Influencer
 
Posts: 18
Liked: never
Joined: Fri May 06, 2016 3:44 pm
Full Name: Guido G


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 1 guest