UNSOLVED

VictorG

updated

7 years ago

V

VictorG

14 Posts

0

6054

July 9th, 2019 08:00

List all active restore sessions/jobs from the CLI

Hi all,

Is there a way to list all restore jobs/sessions from CMD with a single line? (We have NetWorker 9.1 on Windows Server 2012)

It would be really nice if I could also see for how long it's been running, but not mandatory.

Many thanks

Victor

  • bingo.1

    1 Rookie

    •

    2430 Posts

    4369

    0

    Posted July 9th, 2019 08:00

    You could use nsrwatch - it provides a similar interface like the Monitoring GUI.

    Type 'H' to get to the online help.

     

  • bingo.1

    1 Rookie

    •

    2430 Posts

    4348

    0

    Posted July 9th, 2019 10:00

    Such is not possible (something like 'jobinfo' similar to 'mminfo') does not exist.

    You can use jobquery but the handling and output are in the same way as NW's 'nsradmin'.

     

  • VictorG

    14 Posts

    4353

    0

    Posted July 9th, 2019 10:00

  • VictorG

    14 Posts

    4352

    0

    Posted July 9th, 2019 10:00

    My question is whether I can list all restore jobs from a single line in CMD.

  • VictorG

    14 Posts

    4355

    0

    Posted July 9th, 2019 10:00

    I can list sessions by typing this in order:

    nsradmin
    show session
    print type: nsr

    However I don't know how to combine it into a single line.

  • VictorG

    14 Posts

    4350

    0

    Posted July 9th, 2019 10:00

    I added this to file.txt:

    show session
    print type: nsr

    I then ran:  nsradmin -i file.txt

    It doesn't work, what am I doing wrong

  • VictorG

    14 Posts

    4346

    0

    Posted July 9th, 2019 10:00

    This almost works but gives me the wrong info:

    Capture

    how do I insert "show session" in there?

    Ps. I can't type the command in the post, the website is bugged.

  • bingo.1

    1 Rookie

    •

    2430 Posts

    4352

    0

    Posted July 9th, 2019 10:00

    just save the commands to a text file and run the command like 'nsradmin -i file'
  • bingo.1

    1 Rookie

    •

    2430 Posts

    1172

    0

    Posted July 9th, 2019 11:00

    Just assign the command line to a variable, for example '$command'.

    Then execute 'invoke-expression $command'.

     

  • bingo.1

    1 Rookie

    •

    2430 Posts

    4344

    0

    Posted July 9th, 2019 11:00

    Sure it's not the info you wanted. But you used 'nsradmin' instead of 'jobquery' yourself. Of course you must use the appropriate commands.

    The command line reference is very small. May I suggest that you run the following commands with "jobquery":

    . type: recover job; job state: ACTIVE

    show all

    p

    q

    You will get all the attributes/parameters. Next select the ones you need and apply them to the 'show' command. If you need online help, just use 'h' within the 'shell'.