Veeam Removal Drive Powershell

VMware specific discussions

Veeam Removal Drive Powershell

Veeam Logoby cardendave » Fri Jan 13, 2017 8:17 am

Hi All

I am implmenting a Powershell script to delete the contents on the rotated drive before backup. I am aware there is a regkey to do this but it seemed to clear off some of the non rotated backups.

I see there are some Veeam PS commands to delete the backups from the database etc etc. Should I be including these functions? Or just deleting the files?

Anyone have any scripts they wish to share? :)

Thanks

Dave
cardendave
Service Provider
 
Posts: 27
Liked: 1 time
Joined: Wed Jul 22, 2015 7:59 am
Full Name: Dave King

Re: Veeam Removal Drive Powershell

Veeam Logoby PTide » Fri Jan 13, 2017 8:49 am

Hi,

I am aware there is a regkey to do this but it seemed to clear off some of the non rotated backups
Could you elaborate on that please?

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

Re: Veeam Removal Drive Powershell

Veeam Logoby v.Eremin » Fri Jan 13, 2017 11:28 am

There are Windows PowerShell cmdlets, using which you can find directory and files that are present inside it, and remove those files:

- Get-ChildItem (how to find oldest .vbk file)
- Remove-Item (how to remove files that have been written to tapes)

Thanks.
v.Eremin
Veeam Software
 
Posts: 13734
Liked: 1027 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Veeam Removal Drive Powershell

Veeam Logoby cardendave » Fri Jan 13, 2017 3:13 pm

PTide wrote:Hi,

I am aware there is a regkey to do this but it seemed to clear off some of the non rotated backups

Could you elaborate on that please?

Thanks


https://www.veeam.com/kb1154

HKLM\Software\Veeam\Veeam Backup and Replication
ForceDeleteBackupFiles (DWORD)

Set to 3 to make the job delete the entire contents of the backup job’s folder only.
Set to 5 to make the job delete the entire contents of the root backup repository folder, potentially deleting any files belonging to other jobs. Note that if the backup repository points at the volumes root folder, the entire volume's contents are erased.


When each backup is made on rotated media it is creating a full backup. The above key deletes the contents of the job on the drive. However this has caused some issues has it has been deleting some other jobs which is not rotated media.

I believe the best advise is to use Powershell to delete the drive contents. However do I also use the cmdlets to delete the jobs from the Veeam database? Or just delete the files and leave the database untouched?

Does anyone have any scripts they are using?
cardendave
Service Provider
 
Posts: 27
Liked: 1 time
Joined: Wed Jul 22, 2015 7:59 am
Full Name: Dave King

Re: Veeam Removal Drive Powershell

Veeam Logoby PTide » Fri Jan 13, 2017 4:47 pm

However this has caused some issues has it has been deleting some other jobs which is not rotated media.
Are you sure that the repository where the other jobs are pointed to does not have "Rotated media" option enabled? If that holds true and you still observe the other jobs' backups being deleted please contact support team and post your case ID.

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

Re: Veeam Removal Drive Powershell

Veeam Logoby cardendave » Fri Jan 13, 2017 5:20 pm

100%

Spoke to Veeam support who advised a Powershell script
cardendave
Service Provider
 
Posts: 27
Liked: 1 time
Joined: Wed Jul 22, 2015 7:59 am
Full Name: Dave King

Re: Veeam Removal Drive Powershell

Veeam Logoby v.Eremin » Mon Jan 16, 2017 10:16 am

Can you provide us with a support ticket ID, because what you're describing looks strange and we'd like to clarify it internally? Thanks.
v.Eremin
Veeam Software
 
Posts: 13734
Liked: 1027 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to VMware vSphere



Who is online

Users browsing this forum: pkelly_sts and 1 guest