Technical Support Services
Showing results for 
Search instead for 
Do you mean 

DPTIPS: First Saturday schedule hack for HP Data Protector

‎05-24-2011 07:45 PM - edited ‎03-10-2016 08:56 AM

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.  Smiley Wink

 

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!

 

 

About the Author

Jim Turner

Jim is a multi-disciplined engineering professional with 30 years of electronic and systems experience. For the past 17 years, Jim’s primary focus has been enterprise backup, recovery, and archiving (BURA). As an HPE Master Technologist, he is recognized as a global authority on HPE Data Protector, HPE StoreOnce, and the proper integration of both. Jim's consulting has stretched over 350k miles and 145 unique locations in North America during his 9 years with HP(E). When not traveling, Jim resides in Edmond, OK with his wife, two grown children, and two dogs.

Comments
Bruce Murphy
on ‎05-25-2011 08:03 AM

Again thanks Jim this is good stuff.

on ‎03-23-2012 01: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

on ‎03-23-2012 08:44 PM

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

on ‎08-16-2012 02: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 ...... Man Mad

on ‎02-26-2013 12: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. 

on ‎02-27-2013 09:11 PM

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.

on ‎12-21-2014 10:22 PM

Excellent examples..... it helped me tune backup to my requirements.... Thanks

Labels
Events
Aug 29 - Sep 1
Boston, MA
HPE Big Data Conference 2016
Attend HPE’s Big Data Conference on August 29 - September 1, 2016 to learn from peers in every industry and hear from Big Data experts and thought lea...
Read more
Sep 13-16
National Harbor, MD
HPE Protect 2016
Protect 2016 is our annual conference on September 13 - 16, 2016, and is the place to meet the world’s top information security talent, discuss new pr...
Read more
View all