Operating System - HP-UX
1748169 Members
4056 Online
108758 Solutions
New Discussion юеВ

list scheduled backups - command line

 
SOLVED
Go to solution
karim karim_1
Occasional Contributor

list scheduled backups - command line

Hi,

I was hoping someone can tell how I can list scheduled backups using the command line. I need to know what backups are scheduled for the next year and put the information to Excel.

Thanks.
8 REPLIES 8
Alex Glennie
Honored Contributor

Re: list scheduled backups - command line

2 commands spring to mind omnirpt and omnistat ....

I beleive omnirpt only works up to current date and time but reading the omnistat man page I see a -Until date which may prove useful ?
Mark Vollmers
Esteemed Contributor

Re: list scheduled backups - command line

Hi-

If the backups are scheduled and run automatically (whether setup through SAM or script), you should be able to see the schedule through cron. Type "crontab -l" to show the listing. The listing goes by column: minute hour day of month month day of week command. So, for example, an entry of 30 15 * * 1-5 myscript would run myscript at 3:30 in the afternoon Monday through Friday, every month, regardless of the day. Hope this helps.

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Robin Wakefield
Honored Contributor

Re: list scheduled backups - command line

I'm pretty sure "-until" only looks at historical data, not scheduled. You'll probably have to write an external script, based on what you know the entered schedule to be.

Robin.
Andreas Voss
Honored Contributor

Re: list scheduled backups - command line

Hi,

if you mean Omniback you can do it like this.

omnirpt -report lookup_sch -schedule 189 -tab | grep -v '^#' |tr "\t" ";" | sort -t\; -k4n >schedule.csv

This will list all backup schedules from today to 31. December 2001 into the file schedules.csv

Regards
karim karim_1
Occasional Contributor

Re: list scheduled backups - command line

I guess I should have been more clear - I am using omniback.

The omnirpt command would be very useful if I can get it to work. Andreas - I tried what you put on your last posting and received an error message that the parameter string is too long (12:1610) and that there was an error generating the report. Any suggestions??
John Poff
Honored Contributor
Solution

Re: list scheduled backups - command line

Hello,

I do it this way to see them for the next 24 hours:

omnirpt -report lookup_sch -schedule 1

So do it for the next year, you should be able to do:

omnirpt -report lookup_sch -schedule 365

Hmm. I tried that last one and I get the same error. With some trial and error, the highest value that works on my system is 108 days. Weird. Smells like a bug to me.

JP

Ravi_8
Honored Contributor

Re: list scheduled backups - command line

Hi,
scheduling can only be done using either 'cron' or 'at'
never give up
karim karim_1
Occasional Contributor

Re: list scheduled backups - command line

Thanks everyone.