-
- Service Provider
- Posts: 41
- Liked: 1 time
- Joined: Jul 22, 2015 7:59 am
- Full Name: Dave King
- Contact:
Veeam Removal Drive Powershell
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
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
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: Veeam Removal Drive Powershell
Hi,
Thanks
Could you elaborate on that please?I am aware there is a regkey to do this but it seemed to clear off some of the non rotated backups
Thanks
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Removal Drive Powershell
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.
- Get-ChildItem (how to find oldest .vbk file)
- Remove-Item (how to remove files that have been written to tapes)
Thanks.
-
- Service Provider
- Posts: 41
- Liked: 1 time
- Joined: Jul 22, 2015 7:59 am
- Full Name: Dave King
- Contact:
Re: Veeam Removal Drive Powershell
https://www.veeam.com/kb1154PTide 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
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.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.
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?
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: Veeam Removal Drive Powershell
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.However this has caused some issues has it has been deleting some other jobs which is not rotated media.
Thanks
-
- Service Provider
- Posts: 41
- Liked: 1 time
- Joined: Jul 22, 2015 7:59 am
- Full Name: Dave King
- Contact:
Re: Veeam Removal Drive Powershell
100%
Spoke to Veeam support who advised a Powershell script
Spoke to Veeam support who advised a Powershell script
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Removal Drive Powershell
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.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 28 guests