BackupCopy post job to start TapeBackup

PowerShell script exchange

BackupCopy post job to start TapeBackup

Veeam Logoby StefanB » Thu Feb 27, 2014 9:10 am

Hello,

after a successful run of a Backup Copy Job, we want to start a Tape Backup Job but during the continous run of the Backup Copy Job the files are "locked" and postponing the processing.

Starting the following post job activity every cycle will end in a loop (All tasks have already been processed and no new restore points available):

Code: Select all
asnp VeeamPSSnapin
Disable-VBRJob -Job "backupcopyjob"
Start-Sleep -Seconds 120
Start-VBRJob -Job "tapejob"
Start-Sleep -Seconds 120
Enable-VBRJob -Job "backupcopyjob"


Any suggestion for better coding?

Thanks for help
Stefan
StefanB
Influencer
 
Posts: 11
Liked: 3 times
Joined: Tue Oct 15, 2013 7:20 am

Re: BackupCopy post job to start TapeBackup

Veeam Logoby v.Eremin » Thu Feb 27, 2014 10:31 am

All tasks have already been processed and no new restore points available

The situation looks expected, doesn't it? When you re-enable the backup copy job, it checks whether there have been any new restore points created previously. Finding none, it shows you the corresponding message: "All tasks have already been processed and no new restore points available".

Or there is a misunderstanding coming from my side?

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

Re: BackupCopy post job to start TapeBackup

Veeam Logoby StefanB » Thu Feb 27, 2014 11:18 am

You are right - no failure in the job processing.

But the post job batch file starting the powershell commands are running in a loop - never ending.

It always disables the job, start tape backup job, enable backup copy job, no new restore points available, processing the post job batch file, disables the job, start tape backup job, enable backup copy job - and so on.

The job isn't waiting for the new copy interval.

Thanks
Stefan
StefanB
Influencer
 
Posts: 11
Liked: 3 times
Joined: Tue Oct 15, 2013 7:20 am

Re: BackupCopy post job to start TapeBackup

Veeam Logoby v.Eremin » Thu Feb 27, 2014 11:25 am

Have considered scheduling this very script via Windows Scheduler to run at given time, rather than as backup copy job post activity? This way, the "loop" problem will be solved.

If you stick to this scenario, I would recommend to implement some sort of "auditorial" part that makes sure that backup copy job isn't running at the moment.

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

Re: BackupCopy post job to start TapeBackup

Veeam Logoby nefes » Thu Feb 27, 2014 11:27 am

When you run post-job command all backup files should not be locked.
So you could try to remove disable-enable of Backup Copy and leave only Tape job call in your script.
nefes
Veeam Software
 
Posts: 534
Liked: 125 times
Joined: Mon Dec 10, 2012 8:44 am
Full Name: Nikita Efes

Re: BackupCopy post job to start TapeBackup

Veeam Logoby Dsmelser » Fri Apr 11, 2014 7:00 pm

How are you specifying a post Backup Copy Job command?
I can't find a location in the interface to specify one.
[I can find a post copy command on regular backup jobs, just not on back up copy jobs].

FYI, I'm trying to do the same thing.
I am doing frequent backup jobs to repository 1.
Then doing backup copy jobs from repository 1 to repository 2.
Then I want to do tape backups of repository 2.
{I don't want to do tape backups of repository 1 because the tape and backup jobs can't overlap].

Since backup copy jobs run continuously, I can't do the tape backup until I disable the backup copy.
Dsmelser
Influencer
 
Posts: 13
Liked: 1 time
Joined: Wed May 08, 2013 8:28 pm
Full Name: David Smelser

Re: BackupCopy post job to start TapeBackup

Veeam Logoby v.Eremin » Sun Apr 13, 2014 7:20 pm

Then doing backup copy jobs from repository 1 to repository 2. Then I want to do tape backups of repository 2. {I don't want to do tape backups of repository 1 because the tape and backup jobs can't overlap].

As far as I know, even if you select the underlying repository, the files produced by backup copy job that are stored there will be automatically skipped by backup to tape job. So, you should, probably, resort to file to tape job.

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


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 3 guests