Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 4

Hola

Anexo unos ejemplos de comandos para reiniciar los workflows, en caso de que fallen

nsrpolicy start -p Mona -w Mona_wf -c "vm-wego-231:/felix"

nsrpolicy start -p Backup_1 -w lnxrac2q -c "lnxrac2q:All" -s lnxnetworker2q

nsrworkflow -p Backup_1 -w lnxrac2q -A "backup"

nsrworkflow -p Backup_1 -w lnxrac2q -A "backup -l full�

nsrworkflow -p Backup_1 -w lnxrac2q -A "backup -l full -y 'Full Every Day'

nsrpolicy start -p Backup_10 -w intracomiapd01 -c "intracomiapd01:All" -s


lnxnetworker2q

nsrworkflow -p Backup_1 -w lnxrac2q -A "backup"

nsrworkflow -p Backup_1 -w lnxrac2q -A "backup -l full� -a


lleva �-a� de adhoc. Hace un override para ejecutar Full del respaldo

nsrworkflow -p Backup_1 -w lnxrac2q -A "backup -C 'Full Every Day'� -a


lleva �-a� de adhoc. Usa el schedule �Full Every Day�

***** nsrworkflow -p Backup_10 -w intracomiapd01 -A "backup -C 'Full Every Day'� -


a

puede llevar las siguientes opciones dentro del argumento -A

<options>:

[-EFnpvV] [-l level | -C schedule] [-N parallelism]

[-y retention time] [-t date] [-o destination pool] [-r retries] [-c
client ...]

Salu2

Notes

nsrpolicy is the NetWorker policy administration command starting with NetWorker 9.


A lot of the command line administration of NetWorker which was previously done
using nsradmin is now done using the nsrpolicy command.

The first step is to login to the NetWorker server on the command line using the
nsrlogin command with the same credentials as you use to login to the NetWorker
Management Console.When you run the nsrlogin command, the NetWorker host contacts
the NetWorker AuthenticationService to validate the user log in credentials.

nsrlogin -u [user name] - p [password]

The nsrpolicy command has a number of different options available at each level.
Hitting the enter key at each step will give you the full list of available options
for the next part of your command:

nsrpolicy
policy
create | delete | display | update | list
workflow
create | delete | display | update | list
action
create | delete | display | update | list
group
create | delete | display | update
start
Must have: -p [policy] -w [workflow]
Other options (NetWorker 9.2 and above for -c option): -c
{ <client_name1:[save_set_path_1;save_set_path_2],client_name2...> -s [NetWorker
server] -D [debug level] -h
stop
Must have: Either -j [jobid] or -p [policy] -w [workflow]
Other options: -s [NetWorker server] -D [debug level] -h
monitor
Must have: -p [policy]
Other options: -w [workflow] -c [client] -g [group] -d [details] -n
[non-tabular] -j [jobid] -s [NetWorker server] -D [debug level] -h
input-file
Must have: -f [file name]
Other options: [--stop_on_error -S <0/1; default:0 (Do not stop)>]
[--stop_on_error -S <0/1; default:0 (Do not stop)>] -D [debug level] -h
restart
Must have: Either -j [jobid] or -p [policy] -w [workflow]
Other options: -s [NetWorker server] -D [debug level] -h
migrate
Must have what is to be migrated: group | schedule_clone | nas_device
| vmware_policy
Other options: -s [NetWorker server] -D [debug level] -h
help

COMMAND LINE EXAMPLES:

List policies in the datazone


nsrpolicy policy list
nsrpolicy policy list

Display the properties of an action:


nsrpolicy action display -p [policy] -w [workflow] -A [action]
nsrpolicy action display -p Mona -w Mona_wf -A backup

Display the properties of a group:


nsrpolicy group display -g [group]
nsrpolicy group display -g Felix

Disable an action:
nsrpolicy action update [action type backup subtype] -p [policy] -w [workflow] -
A [action] -e no
nsrpolicy action update backup traditional -p FrankHoenikker -w FrankH -A backup
-e no

To change the schedule associated with an action:


nsrpolicy action update [action type backup subtype] -p [policy] -w [workflow] -
A [action] -t [schedule]
nsrpolicy action update backup traditional -p Mona -w Mona_wf -A backup -t
full,incr,incr,incr,incr,incr,incr

Add a client to a group using an input file (client instance must already exist):
Create an input file with the text: group update client -g [group] --
add_clnt_list [client]:[saveset]
cat AddAlicetoTheHook.input
group update client -g TheHook --add_clnt_list vm-lego-231:/alice

nsrpolicy input-file -f "[path to input file]"


nsrpolicy input-file -f "/nsr/AddAlicetoTheHook.input"

Create a new workflow with non-default values for comment, start-time and group:
nsrpolicy workflow create -p [policy] -w [workflow] -c [comment] -g [group] -S
[start time]
nsrpolicy workflow create -p Mona -w Papa -c "Workflow for RedHat 6 clients" -g
PapaMgroup -S "10:00"

Create a new action with non-default values for the target pool and success
threshold
nsrpolicy action create [action type backup subtype] -p [policy] -w [workflow] -
A [action] -o [target pool] -u [success threshold]
nsrpolicy action create backup traditional -p Mona -w Papa -A papabackup -o
SanLorenzoDDPool -u success

Start a workflow (Note that you cannot start an action in this way. You must start
the entire workflow).
nsrpolicy start -p [policy] -w [workflow]
nsrpolicy start -p Mona -w Mona_wf

Stop a workflow (you can get relevant jobid using the 'nsrpolicy monitor' comand -
see below):
nsrpolicy stop -j [jobid]
nsrpolicy stop -j 320819

Start one client in a workflow:


nsrpolicy start -p [policy] -w [workflow] -c "[client]:[saveset]
nsrpolicy start -p Mona -w Mona_wf -c "vm-wego-231:/felix"

Monitor the most recent run of the workflows in a policy:


nsrpolicy monitor -p [policy] -dn
nsrpolicy monitor -p Mona -dn

Detailed job output for a specific recent job:


nsrpolicy monitor -j [job id]
nsrpolicy monitor -j 290473
To start a workflow in debug mode, nsrpolicy is not as effective as the nsrworkflow
command because 'nsrpolicy start' will not log debug output to the /nsr/logs/policy
folder which nsrworkflow will to the raw file.
nsrworkflow -p [policy] -w [workflow] -A "[action]"
nsrworkflow -D9 -p Newt -w newt1 -A "backup"

You might also like