Discussions specific to the VMware vSphere hypervisor
ColtsFanMN
Influencer
Posts: 16
Liked: never
Joined: Oct 28, 2013 3:49 pm
Contact:

How do I get Veeam to overwrite old backups?

Post by ColtsFanMN » Oct 28, 2013 4:58 pm

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.
Product Manager
Posts: 22284
Liked: 1411 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. » Oct 28, 2013 5:40 pm

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!

v.eremin
Product Manager
Posts: 16134
Liked: 1314 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 v.eremin » Oct 29, 2013 7:34 am

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: 16
Liked: never
Joined: Oct 28, 2013 3:49 pm
Contact:

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

Post by ColtsFanMN » Oct 30, 2013 1:21 pm

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

v.eremin
Product Manager
Posts: 16134
Liked: 1314 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 v.eremin » Oct 30, 2013 1:49 pm 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.
Product Manager
Posts: 22284
Liked: 1411 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. » Oct 30, 2013 1:51 pm 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: 16
Liked: never
Joined: Oct 28, 2013 3:49 pm
Contact:

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

Post by ColtsFanMN » Oct 30, 2013 2:37 pm

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.
Product Manager
Posts: 22284
Liked: 1411 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. » Oct 30, 2013 2:46 pm

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: 16
Liked: never
Joined: Oct 28, 2013 3:49 pm
Contact:

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

Post by ColtsFanMN » Oct 30, 2013 2:57 pm

I'll just write a script to delete the files, Veeam obviously doesn't know how to.

v.eremin
Product Manager
Posts: 16134
Liked: 1314 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 v.eremin » Oct 30, 2013 2:58 pm

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.
Product Manager
Posts: 22284
Liked: 1411 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. » Oct 30, 2013 2:59 pm

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: 5290
Liked: 2145 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 » Oct 30, 2013 3:19 pm 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: 16
Liked: never
Joined: Oct 28, 2013 3:49 pm
Contact:

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

Post by ColtsFanMN » Oct 30, 2013 3:22 pm

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: 16
Liked: never
Joined: Oct 28, 2013 3:49 pm
Contact:

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

Post by ColtsFanMN » Oct 30, 2013 3:25 pm

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: 5290
Liked: 2145 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 » Oct 30, 2013 3:34 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests