PowerShell script exchange
Post Reply
StefanB
Influencer
Posts: 13
Liked: 3 times
Joined: Oct 15, 2013 7:20 am
Contact:

BackupCopy post job to start TapeBackup

Post by StefanB »

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
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: BackupCopy post job to start TapeBackup

Post by veremin »

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.
StefanB
Influencer
Posts: 13
Liked: 3 times
Joined: Oct 15, 2013 7:20 am
Contact:

Re: BackupCopy post job to start TapeBackup

Post by StefanB »

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
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: BackupCopy post job to start TapeBackup

Post by veremin »

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.
nefes
Veeam Software
Posts: 643
Liked: 162 times
Joined: Dec 10, 2012 8:44 am
Full Name: Nikita Efes
Contact:

Re: BackupCopy post job to start TapeBackup

Post by nefes »

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.
Dsmelser
Influencer
Posts: 13
Liked: 1 time
Joined: May 08, 2013 8:28 pm
Full Name: David Smelser
Contact:

Re: BackupCopy post job to start TapeBackup

Post by Dsmelser »

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.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: BackupCopy post job to start TapeBackup

Post by veremin »

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.
Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests