UNSOLVED

3ksuresh

updated

4 years ago

3

3ksuresh

16 Posts

0

5889

July 15th, 2015 00:00

Looking for script to find last night backup status for all client

Hi All,

I was trying to create a script to find the backup status for each client, instead of savesets.

What is noticed in networker, its possible to get the backup status with ssflags.

could you please provide some command, that should provide an output like this.

Ex:

GroupName     ClientName     BackupStartDate      Backupcompletiondate Status

Daily_Full          abcd               14/June/2015 18:00   15/June/2015 3:00     completed/incompleted/failed/interrupted

  • 3ksuresh

    16 Posts

    3454

    0

    Posted July 15th, 2015 03:00

    Thanks for your response.

    I am looking for an command to get the out in notepad format, which would help me to prepare the daily backup report with script. so, we can reduce the manual invention to update the daily report on daily basis..

  • ble1

    6 Operator

    •

    14354 Posts

    •

    56186 Points

    3448

    0

    Posted July 15th, 2015 03:00

    You can extract this via jobdb.

  • ble1

    6 Operator

    •

    14354 Posts

    •

    56186 Points

    3452

    0

    Posted July 15th, 2015 04:00

    How you wish to format it is your thing - you can do whatever you want when scripting this as you define output format as well.

  • 3ksuresh

    16 Posts

    3452

    0

    Posted July 15th, 2015 04:00

    I tried it , but i am not able to get the output in the below format. If you take other backup tool, like netbackup and symantec, we can get the output in the below format using  CLI.

    But, in Network, i dont find a command to get the report in below format.

    so, could you please help, if there is any command available in networker to print the report in below format from CLI.

    Ex:

    GroupName     ClientName     BackupStartDate      Backupcompletiondate Status

    Daily_Full          abcd               14/June/2015 18:00   15/June/2015 3:00     completed/incompleted/failed/interrupted

  • crazyrov

    6 Operator

    •

    1319 Posts

    3452

    0

    Posted July 15th, 2015 05:00

    As H already stated, you are writing a script so you can format is as you wanted you view it as but for the status of the jobs you can use jobquery.

  • 3ksuresh

    16 Posts

    3452

    0

    Posted July 15th, 2015 07:00

    Sorry Buddy,, i missed it..

    actually i am not good in command line..

    if you have any jobquery command , could you please share it..

  • crazyrov

    6 Operator

    •

    1319 Posts

    3452

    0

    Posted July 16th, 2015 00:00

    For the start and end time you could use the following syntax (assuming that you are on a unix system)

    printf ". type: nsr group; name: group_name\n name; last start; last end\n print\n " | nsradmin -i-

    To get what client ran in the respective group and what is the status of that group

    printf ". type: savegroup job; name: group_name; start time: unix_start_time\n show clients list; completion status\n print\n" | jobquery -i-

    HTH

  • 3ksuresh

    16 Posts

    3452

    0

    Posted July 16th, 2015 01:00

    Thanks a lot  for your details.

    Hope this command will work in windows system as well. as we are using w2k8 server as a backup server.

  • 3ksuresh

    16 Posts

    3452

    0

    Posted July 24th, 2015 06:00

    I tried the command and its not working.

    could you please help me with the correct command.

    jobquery> printf". type:savegroup job; name:AMS1-Databases-Daily-001; start time: Tue Jul 21 18:00:01 2015\n show clients list; completion status\n print\n

    unknown command: printf".

    jobquery> p type:savegroup job; name:AMS1-Databases-Daily-001; start time: Tue Jul 21 18:00:01 2015\n show clients list; completion status\n print\n

    Resource parse error: Unterminated resource value list

    type:savegroup job; name:AMS1-Databases-Daily-001; start time: Tue Jul 21 18:00:01 2015\n show clients list; completion status\n print\n

                                                                                 ^

    usage: print [query] (set current query)

    jobquery> p type:savegroup job; name:AMS1-Databases-Daily-001; start time: Tue Jul 21 18:00:01 2015\n show clients list; completion status\n print\n" | jobquery -i-

    Resource parse error: Unterminated resource value list

    type:savegroup job; name:AMS1-Databases-Daily-001; start time: Tue Jul 21 18:00:01 2015\n show clients list; completion status\n print\n" | jobquery -i-

                                                                                 ^

  • crazyrov

    6 Operator

    •

    1319 Posts

    1482

    0

    Posted July 24th, 2015 07:00

    Do not use printf within the jobquery command. This is to be used from your command prompt