Technical Support Services Blog
Discover the latest trends in technology, and the technical issues customers are overcoming with the aid of HP Technology Services.

DPTIPS: First Saturday schedule hack for HP Data Protector

There are a good many ways you can schedule a backup with HP Data Protector.  Whether it's a daily incremental or a weekly full, we have you covered.  But what about those special cases where regulatory requirements or other factors dictate that you execute a backup on the first Saturday of each month?  Try as you may, there is no option to be found in DP's GUI to enable scheduling such a regimen without manually going to the first Saturday of each month and placing an entry there.  How far out should you go?  A year?  Two years?  And then how shall you remember to go schedule more before those run out?

 

Clearly, DP has opportunities for improvement in the realm of scheduling.  But I would rather light a candle than curse your darkness.  Though I cannot share timelines or versions, I've been assured by the highest authorities within product development that measurable improvement to the scheduler is in the works.  While that may give us all a warm fuzzy, it doesn't do diddly for our immediate needs.  But don't dismay, Mr_T is here to help!

 

First a quick reference on the location of filesystem backup schedule files:

 

Windows 2003 and earlier
C:\Program Files\OmniBack\Config\Server\Schedules

Windows 2008 and later
C:\ProgramData\OmniBack\Config\Server\Schedules

Unix and Linux
/etc/opt/omni/server/schedules

  

In the schedules directory are simple ASCII files with names that correspond to scheduled backup specifications.  You can easy edit these files with Notepad or vi.  Be sure to close then reopen your DP GUI after manually editing a schedule file to eliminate the possibility of seeing or applying cached information.

 

It is at this point that I need to give full credit to to Paul Carapetis who is an HP Software Pre-Sales Consultant in the South Pacific region.  Paul worked in conjunction with one of his customers to formulate this brilliantly simple solution.

 

First, create any old schedule for the job such as a full backup each Saturday.

 

# pwd
/etc/opt/omni/server/schedules

# cat Test

-full
-every
        -day Sat
        -at 17:00

  

Now edit the schedule file and replace its contents with the following.

 

-full
        -day 1 2 3 4 5 6 7
        -at 17:00

-full
-exclude
        -day Mon Tue Wed Thu Fri Sun
        -at 17:00

 

This logic says literally, "Start the backup at 17:00 on the first seven days of each month UNLESS the weekday is Monday, Tuesday, Wednesday, Thursday, Friday, or Sunday."  Note the conspicuous absence of Saturday in that exclude list.  Also, the mode (-full) and time (17:00) must agree throughout the file to make this magic work.  Adjust the times to the desired start time of your backup.  As Paul so aptly stated to me, "It will only run on the first Saturday of the month...until weeks get 8 days."

 

Paul's solution is eloquent both in its brevity and effectiveness.  What you see below is my attempt to achieve similar functionality with the difference being that we're aiming for the last Sunday of each month.  Having a variable number of days in each month added a little complexity.  Leap years really threw a wrench in the works.

 

-full
-every
        -day 25 26 27 28 29 30 31 -month May Jul Aug Oct Dec Jan Mar
        -at 21:00

-full
-every
        -day 24 25 26 27 28 29 30 -month Jun Sep Nov Apr
        -at 21:00

-full
-every
        -day 22 23 24 25 26 27 28 -month Feb
        -at 21:00

-full
-exclude
        -day Mon Tue Wed Thu Fri Sat
        -at 21:00

  

This actually works with 100% accuracy for the next 20 years.  It falls apart in 2032 which is a leap year that has Sundays on both the 22nd and the 29th.  Hopefully, that scheduler improvement I mentioned earlier will materialize within the next 20 years making this entire "hack" a moot point.  :smileywink:

 

Don't forget to close your GUI after making these manual "behind the scenes" changes.  Reopening the GUI clears the cache and forces it to re-parse the contents of datalists and schedules as you browse them anew.

 

Have you discovered any cool schedule file hacks?  Is there a schedule scenario that isn't addressed by existing GUI functionality or the first/last examples in this article?  Please leave a comment and let me know!

 

 

Labels: Data Protector
Comments
murphyranch | ‎05-25-2011 04:03 PM

Again thanks Jim this is good stuff.

Uli Wallscheid | ‎03-23-2012 08:06 AM

HI,

in the changes to the schedule (upper example)  file don't you need a "-every" in the 2nd line?

Just tested with "-every" and it worked fine. Is it optional?

 

Kind regards,

UliW@IM

Mr_T | ‎03-24-2012 03:44 AM

Hi Uli,

 

I'd say it's optional.  I just pasted the "non-every" version into a schedule file, and it still parses out correctly when you look at it through the GUI.  After adding the -every on the 2nd line and refreshing the GUI, it still parses correctly and creates the desired schedule.

 

Thanks,

Jim

Dzinks | ‎08-16-2012 10:14 AM

Good job, but i would like to do someting else. I would like to change somthing in my schedule. 

Acctualy at Mon-Thursday i have inc1, at saturday full. Every first friday of month i put tapes for month backup. 

 

I've create diffirent pool with permanent protection and change schedule file of it to make backup  every first saturday. 

 

I would like to change reguar schedule file to exclude first saturday of the month. How can i do that?

 

Of coure i could do it manual via GUI, but do it for 2 and more years ...... :manmad:

Seetha Ram Battula | ‎02-26-2013 08:51 AM

I've installed DP 6.2 and created some backup specifications. Schedules are not running automatically. I've updated the licenses as well.

 

I'm new to Data Protector. 

Mr_T | ‎02-28-2013 05:11 AM

There are numerous variables to address.  Your best bet is to open a call with the HP Response Center using your Data Protector software support SAID.

Leave a Comment

We encourage you to share your comments on this post. Comments are moderated and will be reviewed
and posted as promptly as possible during regular business hours

To ensure your comment is published, be sure to follow the community guidelines.

Be sure to enter a unique name. You can't reuse a name that's already in use.
Be sure to enter a unique email address. You can't reuse an email address that's already in use.
Type the characters you see in the picture above.Type the words you hear.
Search
Showing results for 
Search instead for 
Do you mean 
About the Author
Mr_T? Yes, but in name only. No mohawk or gold chains. In real life I'm Jim Turner, a Master Technologist with HP's Integration and Techn...
Featured


Follow Us
Top Kudoed Posts
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.