Host-based backup of VMware vSphere VMs.
Post Reply
ColtsFanMN
Influencer
Posts: 17
Liked: never
Joined: Oct 28, 2013 3:49 pm
Contact:

How do I get Veeam to overwrite old backups?

Post by ColtsFanMN »

I am trying to get Veeam to delete and/or overwrite the old backup that exists on the removable cartridge. Retention Policy set to '1' does not work.

Environment:
10 VMs on VMware, all Windows Servers.
Physical 'Backup' server, with attached RDX cartridge drive and 1TB RDX cartridges.
Only one (1) Backup Repository (the RDX drive).
Only one (1) Backup Job (a Daily Full Backup).

We switch cartridges M-F, with four (4) rolling weeks of cartridges.
We don't want or need 'incremental' backups, only Full.

Everything works as we want it to work, except Veeam does not delete/overwrite the old (28 day old) backup first, so the drive runs out of space, and the backup fails. If we first delete the old backup off the drive cartridge, the backups are successful, and work great. We have even restored files from backup cartridges that go perfect, the only thing that does not work is overwriting the old backup file.

Help! Thanks in Advance!
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by Vitaliy S. »

Hello,

When you set a retention policy to 1, Veeam backup server tries to locate the previous full backup, and since you rotate the drives it cannot find it. That is why all your previous full backups will always stay on the drives, as backup server assumes they have already been deleted.

In order to make it work, you need to set your retention policy to 20 (four weeks doing 5 backups each business day). In this case when you put your 1st drive (from the 1st week) containing your oldest backup, it will be detected and automatically removed due to retention policy. See this similar thread for more details.

Let me know if that helps!
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by veremin »

Otherwise, you can write and schedule (Task Scheduler) a PS script that will clear out given drive and initiate job start afterwards.

Thanks.
ColtsFanMN
Influencer
Posts: 17
Liked: never
Joined: Oct 28, 2013 3:49 pm
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by ColtsFanMN »

Resetting the retention policy to 20 does not work. It still doesn't delete the old backup. I counted the backups and it was 20 days old, but still didn't delete the file.

I don't want to use a script unless all other options are exhausted. It's dangerous to say the least if for some reason the cartridges aren't changed, the good/recent backup will be deleted. That won't work, unless there is some way to check a file date attribute and only delete the file if it's over X days old... I'm not a script writer by trade (I know enough to be dangerous is all) so I would need some assistance in this direction..

Still looking for a VEEAM solution if possible! This can't be that hard

Thanks
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by veremin » 1 person likes this post

Just to be sure – can you confirm that the drive to which the 20th restore point was copied also hosted a 1st restore point which was supposed to be deleted according to retention policy?

Thanks.
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by Vitaliy S. » 1 person likes this post

If you do not mix the order of rotated drives, then retention policy will be applied. BTW, do you see the restore points that were supposed to be deleted in the backup console when you click on the backup files restore points?
ColtsFanMN
Influencer
Posts: 17
Liked: never
Joined: Oct 28, 2013 3:49 pm
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by ColtsFanMN »

There is only one drive/repository for backups.. we don't rotate anything but the removable cartridges.. so Veeam should see the location as the same each time.

I am not quite sure what you mean when you ask about 'restore points on the backup files restore points'... under the backup tree, Backups/Disk, only shows the last backup. If I need to restore from a point before that, I have to 'import' the backup. Is that where you are asking about?
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by Vitaliy S. »

ColtsFanMN wrote:I am not quite sure what you mean when you ask about 'restore points on the backup files restore points'... under the backup tree, Backups/Disk, only shows the last backup. If I need to restore from a point before that, I have to 'import' the backup. Is that where you are asking about?
Have you changed the retention policy settings as I have advised above? Keep in mind that If backup server doesn't have these points registered in the configuration database, then it will never know that it has to delete these backup files on the rotated cartridges. When you rotate the drive/cartridge, there is no previous restore point present, so backup server acts according to the configured retention policy settings.
ColtsFanMN
Influencer
Posts: 17
Liked: never
Joined: Oct 28, 2013 3:49 pm
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by ColtsFanMN »

I'll just write a script to delete the files, Veeam obviously doesn't know how to.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by veremin »

Additionally, once you set everything correctly, you will need not to break the order of removable cartridges. In other words, the specified retention policy (20) will take effect only if the 20th restore point is copied to the cartridge that hosts 1st restore point.

Thanks.
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by Vitaliy S. »

Yes, you can write a script for this custom scenario, but setting retention policy to 20 will do the its job as well. Thanks!
tsightler
VP, Product Management
Posts: 6009
Liked: 2843 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by tsightler » 1 person likes this post

v.Eremin wrote:Additionally, once you set everything correctly, you will need not to break the order of removable cartridges. In other words, the specified retention policy (20) will take effect only if the 20th restore point is copied to the cartridge that hosts 1st restore point.
Unfortunately this is much more difficult to accomplish in the real world than it at first sounds, there's just too many ways for something to go wrong. People get sick and are unexpectedly out, or there's a holiday or someone inserts the 19th day backup instead of the 20th, etc.

For now the best way to handle this today is with a script as Veeam's backup to disk functionality was really not written with rotated media in mind. Sure there are some hacks that make it partially work, but the most reliable option is to use a simple script. There are many examples on the forum and some are written to make sure the file is older than a specific date before deleting it. Many customers have been happily using these scripts for years.
ColtsFanMN
Influencer
Posts: 17
Liked: never
Joined: Oct 28, 2013 3:49 pm
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by ColtsFanMN »

This is not a 'custom scenario' unless you are counting every use of the Veeam software as a 'custom scenario'...

I am not trying to be rude, but this is not rocket science, people.

Of course, I set the retention policy settings as you advised! How else would I know if they didn't work? If something else needed to be set too, then I need to know that as well.

I don't know why Veeam can't just say 'ok, this file is older than XX days (the retention policy), so I will delete it first..'. Every other backup software I have ever used can do this, just not Veeam. Or at least it can't do it without meeting several different conditions first. Which just makes it problematic to use, not easy or safe.
ColtsFanMN
Influencer
Posts: 17
Liked: never
Joined: Oct 28, 2013 3:49 pm
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by ColtsFanMN »

Thank you tsightler, exactly!

If you have a link by chance to one or more of those script examples, I would appreciate it.

Thanks much.
tsightler
VP, Product Management
Posts: 6009
Liked: 2843 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by tsightler »

Since you are running only full backups directly to the repository probably the easiest solution is to just use something like this:

http://www.networknet.nl/apps/wp/publis ... han-x-days

It's east to customize to delete only VBK files from your selected path. Just schedule it to run via Task Manager a few minutes before your Veeam backup job is scheduled and it will delete any backup files older than the configured number of days. You can always run it manually for a while to make sure it works as expected before you decide to schedule it.
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by Vitaliy S. »

ColtsFanMN wrote:This is not a 'custom scenario' unless you are counting every use of the Veeam software as a 'custom scenario'...

I am not trying to be rude, but this is not rocket science, people.
I was just trying to help, so you could automate everything without scripts. Not sure why you still have only 1 restore point available in the backup console, as retention policy should keep 20 of them, assuming you had new job runs.

In addition to what have Tom said, you can use Task Manager to start your Veeam backup job via PowerShell right after the script above does its job.
ColtsFanMN
Influencer
Posts: 17
Liked: never
Joined: Oct 28, 2013 3:49 pm
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by ColtsFanMN »

Thanks tsightler, that script works great. I tested it using files of different dates and it works like a charm. The problem I had with running a script was the possibility of deleting a previous day's backup if no one had a chance to change it out before the next day ran, so this is great.

I appreciate it very much.

Vitaliy S, I appreciate your willingness to help also. And like I said, it should not be so hard to do.. but clearly the software doesn't make it easy. I meant what I said about not wanting to be rude, just get very frustrated when something so simple turns into a major task, so nothing personal is intended.

I hope Veeam updates their software to make simple situations like this easier for sure. I mean, only one backup job, one repository, switch cartridges once each day.. let's face it.. this is not a complex or custom scenario... it doesn't get much simpler than that!

Have a pleasant day all, and thanks! :D

ColtsFanMN
CCFCIT
Lurker
Posts: 2
Liked: never
Joined: Feb 26, 2014 8:46 pm
Full Name: Campbell County KY Fiscal Court IT
Contact:

[MERGED] Veeam not cleanning out old backups.

Post by CCFCIT »

We have Veeam handling 4 VM ESXi 5.5u1 hosts, the backup target is a set of 4 Buffalo 4tb NAS drives which are each one rotated out weekly. The backups job is set for daily incremental backups with a full backup every Friday. The retention policy is set to keep 14 restore points on disk.

The theory here is that each drive has a 1 week set of backups from this month and 1 seek from last month. However Veeam does not seem to remove older backups, which has caused the backup job to fail till we manually clean it out.
Is this by design or is there a setting we are missing?
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by Vitaliy S. »

Veeam backup server will remove files at the end of the backup job. Do you use forward incremental backup mode? If yes, then retention policy should be applied at the end of the 3rd week and you should have 1st device inserted to remove files automatically. When you insert the 4th device, Veeam backup server cannot find files located on the first drive and assumes that these files are already deleted. Please review this topic for additional information on this.
CCFCIT
Lurker
Posts: 2
Liked: never
Joined: Feb 26, 2014 8:46 pm
Full Name: Campbell County KY Fiscal Court IT
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by CCFCIT »

Vitaliy S. wrote:Veeam backup server will remove files at the end of the backup job. Do you use forward incremental backup mode? If yes, then retention policy should be applied at the end of the 3rd week and you should have 1st device inserted to remove files automatically. When you insert the 4th device, Veeam backup server cannot find files located on the first drive and assumes that these files are already deleted. Please review this topic for additional information on this.
We are currently set up for Incremental (non-reverse, non-synthetic full) with an active full backup on Saturday Is there any way to have it take into account the rotation of the drives? (like setting it to keep 56 recovery points?)

Edit: for the files to be there when the system goes to remove them, the retention would have to be set to 77. This would keep 3 sets of backups on the drive until Friday of the 3rd month and then it would be able to clean them off as the file are there, unless we miss the drive swap at some time. am I correct in thinking it works this way?
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: How do I get Veeam to overwrite old backups?

Post by Vitaliy S. »

CCFCIT wrote:Is there any way to have it take into account the rotation of the drives? (like setting it to keep 56 recovery points?)
With extending retention policy setting and not mixing drives, meaning that on the 5th week you should insert the 1st drive, then I believe it should work.
CCFCIT wrote:for the files to be there when the system goes to remove them, the retention would have to be set to 77. This would keep 3 sets of backups on the drive until Friday of the 3rd month and then it would be able to clean them off as the file are there, unless we miss the drive swap at some time. am I correct in thinking it works this way?
Yes, you cannot miss the swap drive, however there is no need to keep 77 restore points if you need just 2 weeks and have 4 drives. On every drive you will have 7 backup files, it means that you will have 7 * 4 = 28 restore points in total. In order to remove the 1st backup chain on the first drive you should set 22 as your retention policy.

This will lead to the following behavior:

1st drive: 1f + 6i
2nd drive: 1f + 6i
3rd drive: 1f + 6i
4th drive 1f + 6i

When you insert the 1st drive, Veeam backup server will create new full and then remove 1f + 6i files.

P.S. btw, it has almost slipped my mind, but the easiest way would be to use our latest patch and these reg keys to cleanup all the files > v7 Backup Copy Job removable media (rotated drives)
Post Reply

Who is online

Users browsing this forum: No registered users and 114 guests