Discussions related to exporting backups to tape and backing up directly to tape.
Post Reply
mshin
Novice
Posts: 4
Liked: never
Joined: Jun 22, 2012 3:12 pm
Contact:

Daily-Weekly-Monthly-Yearly backup scheduling

Post by mshin »

Hi,

We're trying to get GFS tape backup scheduled.
Our intention is to have 4 media pools with different retention.
Daily will run Mon~Thur night, weekly/monthly/yearly on Friday.
Is there any way to schedule these jobs so that weekly runs on all Fridays except for the last Friday of the month?
Something like cancel job if no tape drive is available for 30 min would do the trick, as I can schedule monthly/yearly job to run 10 minutes before the weekly job.

Thanks

Mike
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Daily-Weekly-Monthly-Yearly backup scheduling

Post by veremin »

Since you're after GFS rotation scheme, this post might be helpful. As to your second question, you can schedule a simple script disabling a job execution on the last Friday of the month.

Thanks.
mshin
Novice
Posts: 4
Liked: never
Joined: Jun 22, 2012 3:12 pm
Contact:

Re: Daily-Weekly-Monthly-Yearly backup scheduling

Post by mshin »

I've ended up writing up a quick script.
Hope this helps anyone who's having similar problem.

$today=get-date
$nextfri=get-date.adddays(7)

If($today.month –ne $nextfri.month) {
Get-VBRJOB | where {$_.name -eq "Weekly Job Name"} | Disable-VBRJob
Get-VBRJOB | where {$_.name -eq "Monthly Job Name"} | enable-VBRJob
} else {
Get-VBRJOB | where {$_.name -eq "Weekly Job Name"} | Enable-VBRJob
Get-VBRJOB | where {$_.name -eq "Monthly Job Name "} | Disable-VBRJob
}

THis can be scheduled to run every friday before job starts, to enable monthly and disable weekly on last friday of the months (and vice versa for any other friday)
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Daily-Weekly-Monthly-Yearly backup scheduling

Post by veremin »

I believe that it would be easier to write a simple script that disables weekly job and schedule this script (via Task Scheduler) to take place on the last Friday of month. Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests