http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 2 B D!1#($-+1&(! B%B 2E,1 &" , *&+#(*,!-,.F To unueistanu what a !"#$%!&'(&) is, we fiist neeu to ievisit what a stanuaiu IT oi computei book looks like. Typically it will iun into the size of seveial hunuieu pages, most of which the aveiage powei usei will iaiely use. 0n the othei hanu, a miciomanual is insteau a shoit, concise guiue aimeu at pioviuing a compiehensive oveiview of, anu instiuctions foi a specific topic in as small a space as possible. The thiee piinciples of a miciomanual aie: Youi time as the ieauei is piecious You uon't want to ieau stuff taigeteu at beginneis You'u piefei to spenu less money anu get just what you neeu B%@ 2E,1 &" 1E&" *&+#(*,!-,.F This miciomanual is *+,-%$.+$ 0%1+$ 23+$43 5("6+ ,% '3$&6!"', anu will uocument the following topics: 1. An oveiview of the functionality of '3$&6!"'. 2. 0peiational basics: a. 0ffline veisus online configuiation uatabase access. b. Syntax. c. Staiting anu stopping backups. u. Appenu vs 0puate. e. Setting up iegulai backup components - clients, policies, gioups, scheuules anu pools. f. Checking uevice states. S. Auvanceu '3$&6!"': a. Nass upuates. b. Sciipting. c. Regulai Expiessions. u. 0ffline moue. B%G HI90+10$ J-$&0!+0 It is expecteu that the ieauei of this manual: Bas a stiong familiaiity with stanuaiu NetWoikei configuiation components such as gioups, clients, policies, scheuules, pools, etc., anu is able to configuie these components within NetWoikei Nanagement Console. (!" step-by-step instiuctions aie given foi cieating iesouice components in NNC - if these aie iequiieu, this miciomanual is not taigeteu at the ieauei.) Bas at least a passing level of expeiience with eithei opeiating system sciipting languages oi cioss-platfoim sciipting languages such as Peil. Bas a spaie host (physical oi viitual) that NetWoikei can be installeu on in evaluation moue foi piactice sessions. This can be any opeiating system oi class of machine capable of iunning NetWoikei (a seivei class system is not iequiieu). It is assumeu that while the ieaueis will have goou NetWoikei expeiience, they will have little exposuie to '3$&6!"'. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S K,:.0 (' L(!10!1" B D!1#($-+1&(!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @ 1.1 What is a miciomanual........................................................................................................................................ 2 1.2 What is this miciomanual................................................................................................................................... 2 1.S Expecteu Auuience ................................................................................................................................................. 2 @ 2,#!&!M %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% N G >(+-*0!1 L(!O0!1&(!" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% P Q 8011&!M R1,#10$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% S 4.1 Resouice Batabase.................................................................................................................................................. 9 4.2 0ffline veisus 0nline........................................................................................................................................... 1u 4.S Caie anu Respect .................................................................................................................................................. 1u T U(5 1( $( 1E0 0I,*9.0"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BB V W90#,1&(!,. X,"&+"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% B@ 6.1 About NetWoikei Commanus......................................................................................................................... 12 6.2 Running nsiaumin ............................................................................................................................................... 12 6.S Syntax 0veiview................................................................................................................................................... 1S 6.4 Staiting anu Stopping Backups ...................................................................................................................... 18 7898: -;&, <%(4)) '++6888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 := 7898> ?%'",%$"'@888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 := 7898A B,&$,"'@ & C&#.(D 888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 := 78989 B,%DD"'@ & E(''"'@ C&#.(D8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 >F 7898G H;+#."'@ ,;+ 3,&,(3 %I & @$%(D88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 >> 78987 H)%'"'@ &'6 ?%'",%$"'@ 888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 >A 6.S Appenu vs 0puate ................................................................................................................................................ 24 6.6 Setting up Regulai Backup Components.................................................................................................... 26 7878: C$%13+ &'6 E+,+',"%' 0%)"#"+3 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 >7 7878> B#;+6()+3888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 >= 7878A 5$%(D3 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 A: 78789 H)"+',3 888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 AA 7878G 0%%)3888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 AG 78787 E+J"3","'@ %($ 5$%(D3 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 AK 6.7 Nonitoiing Bevices.............................................................................................................................................. S8 6.8 Beleting Resouices .............................................................................................................................................. 4u 6.9 Closing Comments................................................................................................................................................ 4S N J$O,!+0$ !"#,$*&!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% QQ 7.1 Intiouuction............................................................................................................................................................ 44 7.2 Bulk Activities........................................................................................................................................................ 44 7.S Sciipting with nsiaumin.................................................................................................................................... 47 K8A8: L',+'6+6 5%&) 888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 9K K8A8> L',$%6(#,%$< 3#$"D,"'@8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 9K K8A8A 0$+)"!"'&$< B+,(D 888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 9= K8A89 M H)"+', H$+&,"%' B#$"D, 8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 GF 7.4 Connecting to the Client Seivices.................................................................................................................. S1 7.S 0sing iegulai expiessions in nsiaumin...................................................................................................... S4 7.6 0ffline Noue ........................................................................................................................................................... SS P J990!$&I J Y K0"1 R01-9 L(!'&M-#,1&(! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TN 8.1 Fiom NetWoikei Nanagement Console..................................................................................................... S7 http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 4 8.2 Fiom 0nixLinux Commanu Line.................................................................................................................. S7 =8>8: E+3%($#+ H%'I"@($&,"%' B+,(D888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 GK =8>8> N%)(!+ B+,(D 888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 G= 8.S Fiom Winuows Commanu Line...................................................................................................................... S8 =8A8: E+3%($#+ H%'I"@($&,"%' B+,(D888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 G= =8A8> N%)(!+ B+,(D 888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 GO
http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S K,:.0 (' Z&M-#0" Figuie 1: NNC view of a NetWoikei policy iesouice ..............................................................................................................9 Figuie 2: 0sing the appenu commanu with Winuows paths............................................................................................. 26 Figuie S: Baily scheuule cieateu in nsiaumin, as vieweu fiom NNC............................................................................ Su Figuie 4: Nonthly scheuule cieateu in nsiaumin, as vieweu fiom NNC...................................................................... S1 Figuie S: viewing a uevice iesouice in Winuows .................................................................................................................. S9 Figuie 6: 0sing the cieate-policy.bat sciipt on Winuows................................................................................................... 47 Figuie 7: 0utput fiom the "cieate-client.bat" sciipt on Winuows.................................................................................. S1 Figuie 8: Running nsiaumin in offline moue ........................................................................................................................... S6 Figuie 9: Bootstiapping the NetWoikei configuiation iequiieu foi the miciomanual on Winuows............. S9 Figuie 1u: Labelling meuia in the ABv_FILE uevices on Winuows ................................................................................ 6u http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 6
http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 7 @ 2,#!&!M This miciomanual uesciibes steps that, if misuseu, coulu cause coiiuption to a NetWoikei configuiation uatabase. As such, they shoulu only be iun on a fieshly installeu NetWoikei lab seivei, iathei than an active piouuction seivei. As is the case with all piouuction systems, powei-usei commanus have the capability to both significantly help successful opeiations, oi to significantly hinuei successful opeiations if useu incoiiectly. Befoie actively using any of the techniques uesciibeu in this miciomanual you shoulu be completely familiai with theii usage fiom self-tiaining in a lab enviionment. Fuitheimoie, you shoulu always have an up to uate bootstiap backup to iecovei shoulu anything go wiong. The authoi takes no iesponsibility foi any uamage to a system, oi loss of functionality causeu by iunning eithei the commanus within this miciomanual, oi commanus auapteu fiom this miciomanual against a NetWoikei enviionment. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 8 G >(+-*0!1 L(!O0!1&(!" Thioughout the uocument, the following conventions will be useu foi foimatting: Boxed text in a standard weight text represents output of commands.
<Boxed, italicised text in angle brackets represent an in-session comment, not output expected to be seen during the session.>
Boxed text in a bold weight text represents commands to be typed in.
Boxed text that is bold and italicised is part of a command to be typed in, but you should substitute with local text (e.g., replacing a hostname).
Text in a dotted box represents scripts that should be saved to file, then executed at a later step. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 9 Q 8011&!M R1,#10$ Q%B [0"(-#+0 >,1,:,"0 If you've woikeu with NetWoikei fiom within the management console (oi pieviously, fiom one of the 0S-specific u0Is), you'ie moie than likely awaie of how configuiation components such as clients, scheuules, gioups, policies, etc., look within the u0I. Foi example, heie's what a policy looks like:
#$%&'( *+ !,- .$(/ "0 1 !(23"'4(' 5"6$78 '(9"&'7( The configuiation uetails foi such a policy aie maintaineu as pait of a plain text file on the NetWoikei seivei, stoieu within the 'ies' uiiectoiy. 0n a 0nixLinux system, this is typically in nsiies, anu on a Winuows system the 6+I&(), install location is "C:\Piogiam Files\Legato\nsi\ies". Pieviously NetWoikei only evei hau S configuiation files within the ies uiiectoiy: nsi.ies - Nost configuiation options nsijb.ies - }ukebox, uevice anu label template configuiation options nsila.ies - SecuiityPoit configuiation options 0nfoitunately, with just S files yet many iesouices within each file, coiiuption was not uncommon, anu so in NetWoikei 7.u, a new anu much impioveu iesouice 6&,&P&3+ stiuctuie was intiouuceu. This saw the content of nsi.ies anu nsijb.ies split up anu configuieu as inuiviuual files, locateu unuei a new uiiectoiy, ('nsiub') within the 'ies' uiiectoiy, anu oiganiseu in a hasheu stiuctuie. (0vei time, '3$)&8$+3 was similaily split up, but oiganiseu into a hasheu uiiectoiy stiuctuie unueineath 'nsilaub' in the same paient uiiectoiy, 'ies'.) Foi instance, looking at a 0nix NetWoikei seivei, you may finu uiiectoiies anu files such as the following: # ls /nsr/res/nsrdb 01/ 02/ 03/ 04/ 05/ 06/ 07/ 08/ 09/
# ls /nsr/res/nsrdb/01 0b005d7500000000d2255549000000000a000001 15005d7500000000d2255549000000000a000001 1f00151400000000972e5d4a000000000a000001 1f00261700000000f4efcb4a000000000a000001 1f005d7500000000d2255549000000000a000001 Each one of those lengthy nameu files is a single NetWoikei configuiation iesouice - a policy, oi a client, oi a scheuule, etc. Foi example, the NetWoikei iesouice file foi the 'Nonth' policy on a seivei in my lab looks like: http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 1u comment:; name: Month; number of periods: 1; period: Months; type: NSR policy; resource identifier: 62.0.93.117.0.0.0.0.210.37.85.73.0.0.0.0.10.0.0.1(1) Now, the fiist thing to note is that <%( 3;%()6 '%,, unless uiiecteu to by youi suppoit pioviuei, +J+$ uiiectly manipulate the actual files within the iesouice uatabase 1 . While they may be plain text, they shoulu be tieateu like binaiy uatabase files anu euiteu with the appiopiiate tools insteau. In this case, the appiopiiate tool foi euiting the iesouice uatabase is '3$&6!"'. Q%@ W''.&!0 O0#"-" W!.&!0 NetWoikei's '3$&6!"' utility suppoits two uistinct moues of accessing a iesouice uatabase. These methous aie: :;6$;( - Insteau of inteiacting uiiectly with the files, '3$&6!"' inteiacts with the appiopiiate NetWoikei uaemons on an actively iunning NetWoikei seivei in oiuei to ietiieve, ieview anu upuate infoimation. :006$;( - If the seivei is not cuiiently iunning, '3$&6!"' can insteau be pointeu at eithei a configuiation file oi uatabase, anu inteiact uiiectly with these files. Ceitain "uynamic" paits of the configuiation that uepenu on access to the meuia uatabase, etc., aie not piesenteu in this moue. When woiking with '3$&6!"', it's always veiy impoitant to ensuie that you choose the iight methou. A simple iule is that if the NetWoikei seivei is iunning, you shoulu '+J+$Q !"!# attempt to use '3$&6!"' uiiectly against the files in the configuiation uatabase. Boing so coulu cause seiious coiiuption to youi NetWoikei enviionment iequiiing a bootstiap iecoveiy to iestoie functionality. We'll focus on %')"'+ moue foi this manual. Q%G L,#0 ,!$ [0"90+1 A tool like '3$&6!"' is, in the iight hanus, veiy poweiful anu instiumental in helping a NetWoikei auministiatoi maximise the backup enviionment. Bowevei, misuseu, '3$&6!"' can cause significant pioblems to a configuieu enviionment - it coulu leau to situations wheie backups can no longei function, oi iecoveiies cannot be uone, oi even wheie the NetWoikei seivei won't stait. You shoulu always use '3$&6!"' with a gieat ueal of iespect anu caie. (Let the usei bewaie, so to speak.)
1 To fuithei ieinfoice this point: it woulu be veiy, veiy iaie of a suppoit pioviuei to auvise you to uiiectly euit any of the iesouice files, eithei. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 11 T U(5 1( $( 1E0 0I,*9.0" Thioughout the manual, theie will iegulaily be examples of commanus that you shoulu iun. Foi this ieason, you aie iequiieu foi the puiposes of the tiaining to install a tempoiaiy instance of NetWoikei on a spaie host oi viitual machine. 0ui testlab enviionment foi this miciomanual will theiefoie be one wheie you have: 1. <;92166(= the NetWoikei seiveiclientstoiage noue softwaie appiopiiate to youi opeiating system, uownloaueu fiom PoweiLink oi fiom youi own local iepositoiy, on a woikstation oi laptop. 2. >1.( ;"2 applieu any license keys - this will allow the NetWoikei seivei to iun in evaluation moue foi Su uays, which is moie than enough time to make youi way thiough the manual. S. -";0$%&'(= two uisk backup units - uevices of type "ABv_FILE". ?" ;"2 use this enviionment foi piouuction backups. Thioughout this manual, we will assume that on youi tempoiaiy NetWoikei seivei you've cieateu the following components piioi to continuing to the next chaptei: 1. A gioup calleu "Test". 2. A client instance foi the NetWoikei seivei, with one oi two hanupickeu uiiectoiies as the save sets. 0ptimally, you shoulu be looking foi a total backup size of between 1 anu S uB, so that theie is enough occupieu space to be able to obseive backups, but not so much space that it takes a lengthy time foi examples to finish. S. A backup pool calleu "Test" that has the "Test" gioup assigneu to it. 4. A backup #)%'+ pool calleu "Test Clone". S. Two auvanceu file type uisk backup units: a. 0ne labelleu in the "Test" pool. b. The othei labelleu in the "Test Clone" pool. Refei to "Appenuix A - Test Setup Configuiation" (page S7) foi instiuctions on establishing this configuiation. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 12 V W90#,1&(!,. X,"&+" V%B J:(-1 /012(#30# L(**,!$" In oiuei to maintain common commanus acioss platfoims, NetWoikei uses the same commanu line "switch" aigument on both 0nixLinux platfoims anu Winuows platfoims - the "uash option" methou. Foi instance, on 0nixLinux to specify the name of a pool in the save commanu, you woulu use "-b poolName", anu on Winuows, you'u use +R&#,)< ,;+ 3&!+ iathei than say, "b poolName". 0nless otheiwise noteu, you shoulu finu that any examples given in this manual will woik on both a Winuows system &'6 a 0nixLinux system, iegaiuless of any commanu piompt pieceuing the commanu. (Wheie theie aie sufficient uiffeiences between platfoims, both 0nixLinux &'6 Winuows examples will be given.) Nost NetWoikei commanus uo not technically suppoit any (3&@+ iequest in the tiauitional way -insteau, they will piint usage infoimation in iesponse to any unknown commanu line option. Theiefoie, when wanting to see what options a NetWoikei commanu will take, it's usually safe to iun the commanu with a "-." aigument. V%@ [-!!&!M !"#,$*&! In oiuei to iun '3$&6!"' on a host, you must &, )+&3, have the NetWoikei client softwaie installeu. 0n 0nixLinux platfoims, '3$&6!"' will usually be installeu into S(3$S3P"', anu on Winuows platfoims, the uefault install location will be "C:\Piogiam Files\Legato\nsi\bin" (it shoulu howevei be in the execution path). To see the usage options foi '3$&6!"', iun: [root@tara ~]# nsradmin -? usage: nsradmin [-c] [-i file] [-s server] [-p {prognum | progname} ] [-v version] [query]... usage: nsradmin [-c] [-i file] [-d resdir] [-t typefile] ... [query]... usage: nsradmin [-c] [-i file] [-f resfile] [-t typefile] ... [query]... When iun with no aiguments, '3$&6!"' expects to connect to a NetWoikei seivei iunning on the cuiient host, anu entei inteiactive moue: [root@tara ~]# nsradmin NetWorker administration program. Use the "help" command for help, "visual" for full-screen mode. nsradmin> If the cuiient machine is just a client howevei, you'll get an eiioi sequence such as the following: [root@fawn ~]# nsradmin 39078:nsradmin: RPC error: Program not registered
There does not appear to be a NetWorker server running on fawn.pmdg.lab. (Note that the actual eiioi output may vaiy uepenuing on the veision of NetWoikei in use, anu the platfoim you aie iunning the commanu fiom.) http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 1S V%G R;!1,I WO0#O&05 As with othei NetWoikei inteiactive commanus, one of the most impoitant keywoius to iemembei when using '3$&6!"' in inteiactive moue is ;+)D. Let's see what '3$&6!"' will tell us about what it can uo. Foi the puiposes of this topic, it is safe to connect to a iunning NetWoikei seivei, since we will only be )%%."'@ at the configuiation, iathei than manipulating it. If you aie iunning '3$&6!"' on the NetWoikei seivei, you can iun '3$&6!"' without any aiguments; if you aie iunning '3$&6!"' fiom anothei client, you will neeu to iun: '3$&6!"' T3 3+$J+$*&!+ as youi commanu. Note howevei that you'll neeu to be authoiiseu as a NetWoikei auministiatoi fiom the host (anu usei account) you connect fiom. Foi instance, iunning '3$&6!"' fiom a stoiage noue, I&1' in my lab anu connecting to a backup seivei ,&$&, I woulu iun the commanu: [root@fawn ~]# nsradmin -s tara NetWorker administration program. Use the "help" command for help, "visual" for full-screen mode. nsradmin> 0nce '3$&6!"' is iunning in inteiactive moue, you'll see that it piints a "nsiaumin>" piompt eveiy time it expects you to 3,&$, a commanu. To get a list of the commanus available, type ;+)D at the nsiaumin> piompt: nsradmin> help Legal commands are: bind [query] create attrlist delete [query] edit [query] help [command] print [query] (set current query) server [name] show [attrlist] types update attrlist append attrlist quit visual [query] option [list] unset [list] . [query] ? [command]
Where: query ::= attrlist attrlist ::= attribute [; attribute]* attribute ::= name [: [value [, value]* ] Note that not all commanus will be the same on Winuows anu 0nixLinux. Foi instance, while "euit" anu "visual" appeai as valiu commanus when iunning help on Winuows, attempting to use them will iesult in a waining message that the function isn't available - foi example: nsradmin> edit External editors are not yet supported edit operation failed. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 14 (The "euit" anu "visual" moues will not be cential to oui examples, anu so the lack of suppoit foi these options on Winuows will not piesent an issue.) You can get auuitional infoimation about a commanu by typing ";+)D #%!!&'6U, oi "V #%!!&'6U, such as: nsradmin> help show
usage: show [attrlist] The show command is used to set and clear the show list, which determines which attributes will be displayed in the"print" command. If an argument attribute list is given, these attributes are added to the show list. If no argument is given, the show list is cleared so that all attributes will be printed. For example, to show only the attribute "name" you would type:
show name
nsradmin> ? print
usage: print [query] (set current query) The print command sets the current query if a query argument is given, then it prints the resource descriptors that match the current query. If the show list is set (using the "show" command), only the attributes in the show list will be printed. For example, to print all resources of type "NSR client" you would type:
print type: NSR client
Anothei "getting staiteu" commanu that you shoulu know of is the ,<D+3 commanu - this gives you a list of the suppoiteu NetWoikei iesouice types foi the seivei that you aie iunning on. This will vaiy, of couise, uepenuing on the veision of NetWoikei that you aie using: nsradmin> types Known types: NSR, NSR client, NSR device, NSR directive, NSR group, NSR jukebox, NSR label, NSR license, NSR notification, NSR policy, NSR pool, NSR schedule, NSR Snapshot Policy, NSR stage, NSR Storage Node; Eveiy iesouice has a ,<D+ - so clients aie of type "NSR client", policies aie of type "NSR policy", etc. To get a hanule on '3$&6!"' syntax, let's stait by tiying to view that Nonth policy we initially lookeu at in "4.1 Resouice Batabase" (staiting page 9). As you can see fiom the above, one of the iesouice types is *BE D%)"#<. To view a iesouice, you'u typically use the D$"', commanu. Fiom the help on the pievious page, you'll iecall that piint has the syntax: print [query] (set current query) (We'll get to "(set cuiient queiy)" in a moment.) A W(+$<, as we saw fiom the help: Where: query ::= attrlist attrlist ::= attribute [; attribute]* attribute ::= name [: [value [, value]* ] http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 1S So, to stait with, we just want to see all the policies. This means we'ie just aftei all the iesouices that aie of type "NSR policy". This means oui queiy consists of just a single attiibute to stait with, anu that attiibute is the following "name:value" paii: type: NSR policy So oui total commanu is: nsradmin> print type: NSR policy type: NSR policy; name: Month; comment: ; period: Months; number of periods: 1;
type: NSR policy; name: Quarter; comment: ; period: Months; number of periods: 3;
type: NSR policy; name: Year; comment: ; period: Years; number of periods: 1;
type: NSR policy; name: Decade; comment: ; period: Years; number of periods: 10;
type: NSR policy; name: Week; comment: ; period: Weeks; number of periods: 1;
type: NSR policy; name: Day; comment: ; period: Days; number of periods: 1; Whoa! As you can imagine, if we just queiy by type all the time, we'ie going to get way too much infoimation anu we'ie going to iely on a long scioll buffei in oui teiminal session. As it happens, oui "Nonth" policy was the fiist one piinteu. Bowevei, let's assume that we've got a )%, of iesouices. (Foi instance, if you'ie uealing with a NetWoikei seivei that has Suu active clients, theie'll be &, )+&3, Suu client iesouices - likely moie, since each new type of backup foi a client will typically have its own client uefinition.) If we want to limit the amount of infoimation shown, we can use the "show" commanu. In this case, let's say we just want to see the iesouice "name" - nothing else. So oui commanu woulu be: nsradmin> show name: nsradmin> print name: Month;
name: Week; Now, we've uone something tiicky theie. See that "piint" commanu. We uiun't specify a queiy. We uiun't neeu to, because of that othei pait of the syntax uesciiption foi piint, which saiu: "(set cuiient queiy)". That's iight, when you issue a D$"', XW(+$<Y commanu, you implicitly tell NetWoikei "Show me X &'6 make the 6+I&(), queiy X so that I have a shoitcut." So in this case, because we'u pieviously issueu the commanu "piint type: NSR policy", NetWoikei inteipieteu oui seconu piint commanu to &)3% be "piint type: NSR policy". This queiy-set behavioui will be instiumental in latei activities. By the way, the colon (:) following the attiibute in the show commanu "3 %D,"%'&); you might wish to skip using it, but I think it auus claiity anu consistency to commanus, given that colons aie iequiieu to sepaiate attiibutes fiom theii values in othei commanus. If you hau a lot of iesouices listeu, you coulu then pick out the name of the iesouice you wanteu, anu issue a moie specific piint commanu to '3$&6!"', making use of that "attilist" pait of the queiy specification - moie than one attiibute, semi-colon sepaiateu. In this case, oui queiy specification will become: type: NSR policy; name: Month !"2( that we 6%'4, teiminate with a semi-colon. The semi-colon is a attiibute 3+D&$&,%$; if you teiminate the queiy specification with a semi-colon, '3$&6!"' won't uo anything, because it will be expecting you to put in &'%,;+$ attiibute. So using this upuateu queiy, we get: nsradmin> print type: NSR policy; name: Month name: Month; Bolu on though, theie's moie to a policy than just it's name. Remembei - we pieviously useu the "show" commanu to iestiict ouiselves to just viewing the name. This will continue to opeiate until such time as we issue anothei "show" commanu. In this case, enteiing "show" by itself will ieveit to the stanuaiu behavioui of showing eveiything, meaning oui commanu anu output will look like the following: nsradmin> show Will show all attributes nsradmin> print type: NSR policy; name: Month; comment: ; period: Months; number of periods: 1; Again, you'll note that I maue use of the queiy shoit-cut behavioui - aftei issuing the "show" commanu, I uiun't issue the full piint commanu again, I just typeu "piint", anu '3$&6!"' filleu in the iest foi me. 0ne final thing that we want to look at befoie finishing is the uisplay %D,"%'3. These contiol how much infoimation '3$&6!"' gives you when you iun a queiy. You can view the cuiiently enableu options by typing the "option" commanu. As of NetWoikei 7.S.x, these options aie: nsradmin> option
Display options: Dynamic: Off; http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 17 Hidden: Off; Raw I18N: Off; Resource ID: Off; Regexp: Off; (It shoulu be noteu that the final option is not ieally a uisplay option, but an input option - we'll get to that latei though.) To tuin a paiticulai option on, you use the commanu: nsradmin> option <feature> To tuin it back off, you can eithei use the commanu: nsradmin> option <feature>: off 0i: nsradmin> unset <feature> Foi instance, let's tuin on "hiuuen" uetails, anu check the Nonth policy again: nsradmin> print type: NSR policy; name: Month type: NSR policy; name: Month; comment: ; period: Months; number of periods: 1; nsradmin> option hidden Hidden display option turned on
Display options: Dynamic: Off; Hidden: On; Raw I18N: Off; Resource ID: Off; Regexp: Off; nsradmin> print type: NSR policy; name: Month; comment: ; period: Months; number of periods: 1; hostname: tara.pmdg.lab; administrator: "user=root,host=tara.pmdg.lab", "user=administrator,host=tara.pmdg.lab", "user=system,host=tara.pmdg.lab"; ONC program number: 390109; ONC version number: 2; ONC transport: TCP; If you've useu the "Biagnostic" moue in NetWoikei Nanagement Console in the past, you'll see ovei time that the auuitional attiibutes that come in when you auu tuin on the hiuuen option mostly map to that moue in NNC. The "uynamic" uisplay option tuins on the uisplay of auuitional attiibutes that aie consiueieu inteimittent. The "Raw IL8N" tuins off ienueiing of inteinationalisation text; the "Resouice IB" tuins on http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 18 the uisplay of each iesouice's unique IB attiibute, anu the "Regexp" option, as mentioneu befoie, is moie of an input option, allowing the use of (some) iegulai expiessions. If you happen to be using an oluei veision of NetWoikei anu some of the examples suggest to show paiticulai attiibutes that uon't subsequently tuin up when <%( iun the commanu, youi fiist poit of call will be to tuin on the ;"66+' anu 6<'&!"# uisplay options - pievious veisions of NetWoikei may not have always shown iequesteu attiibutes if those moues weien't tuineu on. When you'ie uone with '3$&6!"', you can exit it by typing in the commanu "quit": nsradmin> quit That's a basic intiouuction to NetWoikei syntax. We'll move on to moie inteiesting commanus next. V%Q R1,#1&!M ,!$ R1(99&!M X,+3-9" V%Q%B 2E,1 ;(-7.. !00$ In oiuei to complete this section of the guiue, you'll neeu to have configuieu a Test setup as pei section "S Bow to uo the examples" (page 11). If you aie unsuie of how to configuie this, please iefei to "Appenuix A - Test Setup Configuiation" (page S7). As a iesult of this, you shoulu have: An ABv_FILE type uevice with a volume labelleu in the "Test" backup pool. An ABv_FILE type uevices with a volume labelleu in the "Test Clone" backup pool. A gioup calleu "Test". A client instance foi the backup seivei that has saveset(s) of aiounu 1-SuB. V%Q%@ \(!&1(#&!M 0n 0nixLinux platfoims, you may monitoi what we'ie about to uo by iunning '3$1&,#; in anothei teiminal session. Alteinatively, on any platfoim you can monitoi what we'ie about to uo unuei the "Nonitoi" tab foi NetWoikei Nanagement Console. V%Q%G R1,#1&!M , X,+3-9 Fiom within '3$&6!"', like within NetWoikei Nanagement Console 2 , the only type of backup that you can stait at the seivei inteiface is a @$%(D. Theie aie thiee ways that a gioup can be staiteu: Automatically, at it's scheuuleu time oi pait of a piobe scheuule. Fiom the commanu line on the seivei by iunning the appiopiiate 3&J+@$D commanu. Within NetWoikei Nanagement Console oi '3$&6!"' by aujusting it's autostait piopeity to "Stait Now". If you've only evei manually iun a gioup in NetWoikei Nanagement Console, anu you nevei iecall changing the autostait piopeity to "Stait Now", uon't be conceineu. When you stait a gioup out of the Nonitoiing aiea of NNC, you uon't see this option, but that's what NetWoikei uoes in the backgiounu foi you. While flexible, a piimaiy failing of iunning a savegioup manually fiom the commanu line is that it cannot be aboiteu fiom within eithei NetWoikei Nanagement Console oi fiom a utility such as '3$&6!"'. This makes managing the backup somewhat challenging. Staiting the gioup fiom within NNC oi '3$&6!"' takes away that issue though.
2 As of the enu of 2uu9. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 19 So, let's look at manually staiting oui backup using '3$&6!"'. Fiom the backup seivei, iun: # nsradmin nsradmin> print type: NSR group; name: Test type: NSR group; name: Test; comment: ; snapshot: False; autostart: Disabled; autorestart: Disabled; start time: "3:33"; last start: ; last end: ; interval: "24:00"; restart window: "12:00"; force incremental: Yes; savegrp parallelism: 0; client retries: 1; clones: No; clone pool: Default Clone; success threshold: Warning; options: ; level: ; printer: ; schedule: ; schedule time: ; expiration time: ; inactivity timeout: 30; File inactivity threshold: 30; File inactivity alert threshold: 30; work list: ; completion: ; status: idle; Snapshot Policy: Daily; Snapshot Pool: Default; probe based group: False; probe interval: 60; probe start time: "0:00"; probe end time: "23:59"; probe success criteria: all; time since successful backup: 0; time of the last successful backup: ; nsradmin> update autostart: Start Now autostart: Start Now; Update? y updated resource id 115.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(2) So to summaiise the above, we: Piinteu, anu theiefoie set the cuiient queiy to "type: NSR gioup; name: Test". Issueu an &5=12( commanu against the attiibute "autostait", telling NetWoikei to change its value to B,&$, *%1. When piompteu to confiim by NetWoikei, answeieu < to have it go anu make the change. This intiouuces a new commanu in '3$&6!"', the &5=12( commanu. This instiucts '3$&6!"' to &),+$ ,;+ $+3%($#+3 ,;&, !&,#; ,;+ #($$+', W(+$< to use the attiibute values we'ie about to specify. What's impoitant heie is that it woiks on the #($$+', W(+$<. If you weie to iun '3$&6!"' anu attempt to iun the &5=12( commanu without fiist establishing a queiy, '3$&6!"' will use the 6+I&(), queiy, which maps to all iesouices. This, to be blunt, is something you woulu noimally not want to uo. So without the output at all, oui inteiaction with '3$&6!"' was: http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 2u nsradmin> print type: NSR group; name: Test nsradmin> update autostart: Start Now <answer y for yes> Now, the fiist thing that you might note is that a gioup, being a moie complex iesouice than a policy, piouuces significantly moie output on a D$"', statement. Theie's two ways we can effectively ieuuce this. The fiist ieuuction methou, which we've alieauy useu, is to use the 3;%1 commanu fiist. In this case, we might ask '3$&6!"' to only show us the name, type anu autostait attiibute of the iesouice. In this case, oui session woulu look like the following: nsradmin> show name:; type:; autostart: nsradmin> print type: NSR group; name: Test type: NSR group; name: Test; autostart: Disabled; nsradmin> update autostart: Start Now autostart: Start Now; Update? y updated resource id 115.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(7) This gives the flexibility of seeing a "baie minimum" to confiim that the coiiect uetails aie going to be upuateu. The seconu way that you can limit the amount of uetails to be shown is to use the "uot" commanu, which sets the cuiient queiy P(, 6%+3 '%, D$"', the iesults of the queiy. This is something that you shoulu be caieful using - while ieuucing the amount of output on the scieen helps to achieve claiity, going foi none can iesult in a situation wheie youi queiy "misses" anu selects too much but you uon't notice befoie you uo an upuate oi uelete commanu. In geneial I'u usually iecommenu that you ieseive the "uot" commanu only foi situations wheie: You'ie sciipting, anu you've alieauy testeu the queiy You've become sufficiently tiaineu in '3$&6!"' that you aie veiy comfoitable that you know what you'ie uoing &'6 you can uo a bootstiap iecoveiy at the uiop of a hat. The "uot" commanu sees the "piint" commanu liteially ieplaceu with a full-stop (peiiou). Thus, using the uot commanu, we coulu stait the Test gioup using the following sequence: nsradmin> . type: NSR group; name: Test Current query set nsradmin> update autostart: Start Now autostart: Start Now; Update? y updated resource id 115.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(12) The next thing to consiuei is that we've been #;&'@"'@ the autostait attiibute fiom its cuiient value (in oui case, Bisableu) to "Stait Now". Noimally when you upuate a value, you'u expect to see that upuate stick, iight. Well, noimally that is the case, but the &(,%3,&$, attiibute of the gioup iesouice (as well as a few othei attiibutes acioss vaiious iesouices) is a special attiibute that suppoits both iegulai value changes as well as &#,"%' settings. In this case, the value settings peimitteu aie @;1A6(= anu ?$91A6(=. The &#,"%' setting peimitteu is B21'2 !"/. When an attiibute is upuateu with an action setting, NetWoikei will stait the action iequesteu, but leave the attiibute value in its pievious state. V%Q%Q R1(99&!M , [-!!&!M X,+3-9 If a backup has eithei been staiteu fiom within NNC'3$&6!"', oi staiteu automatically as a scheuuleu event, you can use '3$&6!"' to aboit the gioup. We uo this by using anothei attiibute, the "Stop Now" attiibute, anu a special action setting of "Tiue". http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 21 Following is an example of stopping a gioup: nsradmin> show name:; type:; autostart:; stop now: nsradmin> print type: NSR group; name: Test type: NSR group; name: Test; autostart: Disabled; stop now: False; nsradmin> update stop now: True stop now: True; Update? y update failed: Groups must be started either automatically or from the GUI and must be currently running in order to be stopped. Now, see what happeneu above. The pievious section went on foi long enough that oui gioup finisheu, anu so theie was nothing to stop! (Inciuentally, you'll get the above eiioi message if the gioup has been iun fiom the commanu line using the 3&J+@$D commanu.) 0ui challenge heie with backing up a single saveset iepeateuly is that the inciemental changes aie going to be veiy minoi. Foi the time being, let's make suie that eveiy time we iun this gioup, a full backup is attempteu. To uo this, we'll want to: Set the 6(.(6 attiibute of the gioup to I()). Set the 0"'7( $;7'(C(;216 attiibute of the gioup to *%. 0ui commanu will theiefoie be: nsradmin> show type:; name:; force incremental:; level: nsradmin> print type: NSR group; name: Test type: NSR group; name: Test; force incremental: Yes; level: ; nsradmin> update force incremental: No; level: full force incremental: No; level: full; Update? y updated resource id 115.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(17) Boing this will ensuie that when we stait the gioup, we'll have time to stop it befoie it finishes natuially. You'll also note we upuateu moie than attiibute in a single commanu. So stait the gioup again, but then aftei confiiming in youi '3$1&,#; oi NNC monitoiing session that the gioup is iunning, issue the stop commanu again: nsradmin> show Will show all attributes nsradmin> show name:; type:; autostart:; stop now: nsradmin> print type: NSR group; name: Test type: NSR group; name: Test; autostart: Disabled; stop now: False; nsradmin> update autostart: Start Now autostart: Start Now; Update? y updated resource id 115.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(18)
<wait until you can see that the group has started backing up>
http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 22 nsradmin> update stop now: True stop now: True; Update? y updated resource id 115.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(21) V%Q%T LE0+3&!M 1E0 "1,1-" (' , M#(-9 Theie's veiy little you can uo in NNC oi nsiwatch that you can't (in some foim oi anothei) achieve in '3$&6!"'. Checking the status of a gioup is one of those things. Theie aie a few attiibutes that you can look at within a gioup to ueteimine its iunning status: 9212&9 - Inuicates whethei the gioup is iunning, iule oi cloning. 7"C56(2$"; - Betails of the savesets that have completeu, anu how they finisheu. /"'4 6$92 - Savesets that have not iun yet (penuing). Foi example, if we look at oui just-stoppeu gioup, we get some uetails about wheie it was up to when it was aboiteu, anu its cuiient state: nsradmin> show name:; type:; status:; work list:; completion: nsradmin> print type: NSR group; name: Test type: NSR group; name: Test; work list: tara.pmdg.lab, "full:index", index; completion: tara.pmdg.lab, /usr/share, "failed:full:save", "* tara.pmdg.lab:/usr/share 66135:save: NSR directive file (/.nsr) parsed * tara.pmdg.lab:/usr/share (interrupted), exiting * tara.pmdg.lab:/usr/share aborted * <NOTICE> : termination request was sent to job 19 as requested; Reason given was 'Aborted'"; status: idle; Theie's quite a bit of infoimation in the above output. The fiist thing to note is the foimat of the infoimation in both the 1%$. )"3, anu the #%!D)+,"%' attiibutes. These aie piesenteu as multiple- component values. Foi 1%$. )"3,, a set of S components will foim a single value, wheie: The fiist component is the client the saveset is foi. The seconu component inuicates level anu opeiation. The thiiu component inuicates the saveset. So in this case, in the woik list above with a value of: tara.pmdg.lab, full:index, index This equates to a single saveset - the full inuex backup foi the client "taia.pmug.lab" (which is the backup seivei), anu an inuication that the opeiation is an inuex backup. Foi the completion, theie's actually 4 components to each value - client, saveset, status anu messages: tara.pmdg.lab, /usr/share, "failed:full:save", "* tara.pmdg.lab:/usr/share 66135:save: NSR directive file (/.nsr) parsed * tara.pmdg.lab:/usr/share (interrupted), exiting * tara.pmdg.lab:/usr/share aborted * <NOTICE> : termination request was sent to job 19 as requested; Reason given was 'Aborted'"; To see the status change foi the gioup while it's iunning, stait the gioup again, wait a few seconus, anu then piint the uetails, with the same 'show' settings as pei the above: http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 2S nsradmin> print type: NSR group; name: Test type: NSR group; name: Test; work list: tara.pmdg.lab, "full:index", index; completion: tara.pmdg.lab, /usr/share, "failed:full:save", "* tara.pmdg.lab:/usr/share 66135:save: NSR directive file (/.nsr) parsed * tara.pmdg.lab:/usr/share (interrupted), exiting * tara.pmdg.lab:/usr/share aborted * <NOTICE> : termination request was sent to job 19 as requested; Reason given was 'Aborted'"; status: idle; nsradmin> update autostart: Start Now autostart: Start Now; Update? y updated resource id 115.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(24)
<wait a few seconds before running the print command below>
nsradmin> print type: NSR group; name: Test; work list: tara.pmdg.lab, "full:save", /usr/share, tara.pmdg.lab, "full:index", index; completion: ; status: running; At this eaily stage in the gioup, we can see that the woik list iemains populateu with both savesets that will be wiitten: work list: tara.pmdg.lab, "full:save", /usr/share, tara.pmdg.lab, "full:index", index; (Bepenuing on how soon you iun youi commanu, youi output may of couise uiffei.) You'll note that foi the "usishaie" saveset, the "level:opeiation" value is "full:save", iathei than "full:inuex" as we saw pieviously (anu above) foi the inuex saveset. Since the status check was uone befoie the fiist saveset was completeu, the completion status iemains empty, while the actual gioup status shows a value of 'iunning'. V%Q%V L.(!&!M ,!$ \(!&1(#&!M So fai we've only seen two potential states foi a gioup - $(''"'@, oi "6)+. Theie is a thiiu state though - one that's pioviueu when a gioup is cloning. To see what this state is like, we'll neeu to mouify oui gioup "Test" to clone to the "Test Clone" pool. This is ieauily accomplisheu by mouifying the attiibutes as follows: Change the 76";(9 attiibute to Yes Change the 76";( 5""6 attiibute to "Test Clone". To bettei see what we'ie uoing, we'll also use the "show" setting again to ieuuce the numbei of uetails of the gioup to a minimum - name, type, status, autostait, clones anu clone pool. The piocess of will woik as follows: Set the show status appiopiiately. Piint (anu set the cuiient queiy to) the Test gioup. 0puate the cloning attiibutes anu iun the gioup. Wait until the gioup staits cloning. Piint the Test gioup again to view the new status. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 24 If you'ie changing the attiibutes that you want to have shown, be suie to issue the "show" commanu by itself fiist to cleai any pievious settings. Beie's what the session will look like: nsradmin> show name:; type:; status:; clones:; clone pool:; autostart: nsradmin> print type: NSR group; name: Test type: NSR group; name: Test; autostart: Disabled; clones: No; clone pool: Default Clone; status: idle; nsradmin> update clones: Yes; clone pool: Test Clone; autostart: Start Now autostart: Start Now; clone pool: Test Clone; clones: Yes; Update? y updated resource id 115.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(31)
<wait for the backup to finish, and the cloning to start>
nsradmin> print type: NSR group; name: Test; autostart: Disabled; clones: Yes; clone pool: Test Clone; status: cloning; Between gioup status checking, anu uevice status checking (a topic we'll covei befoie the enu of this chaptei), you have the ability to faiily closely see what youi NetWoikei seivei is up to, just fiom within '3$&6!"'. V%T J990!$ O" 69$,10 So fai when we've been alteiing settings in NetWoikei iesouices, we've been using the (D6&,+ commanu. Theie's anothei commanu, &DD+'6, which woiks in a uiffeient, but equally useful way. Let's move away fiom gioups foi the moment, anu consiuei clients. In paiticulai, one of the most ciitical attiibutes foi a client is its 3&J+ 3+, setting. While noimally this shoulu be set to "All" foi filesystem backup client instances, theie may be times when it's necessaiy to have inuiviuually nameu save sets S . To check out oui cuiient client save set status, let's have a look at its settings, iestiicting just to type, name anu save set. Assuming you've just come fiom uoing the gioup section befoie, you'll fiist neeu to cleai youi show settings: nsradmin> show Will show all attributes nsradmin> show name:; type:; save set: nsradmin> print type: NSR client; name: tara type: NSR client; name: tara.pmdg.lab; save set: /usr/share;
S A time that spiings most ieauily to minu is when completing the exeicises in the "nsiu.info miciomanual foi nsiaumin". http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 2S (In the above example, be suie to ieplace the backup seivei name with the name of the host you'ie using to woik thiough this miciomanual.) Now that we've got the client uetails available to us, let's consiuei the uiffeience between (D6&,+ anu &DD+'6: The (D6&,+ commanu tells '3$&6!"' to completely ieplace the cuiient attiibute values with whatevei values you specify; The &DD+'6 commanu tells '3$&6!"' to auu, to multi-value attiibutes, auuitional values you specify. (It shoulu be cleai fiom the above that you can't use appenu if the attiibute fielu uoesn't suppoit it - e.g., you can't &DD+'6 "Stait Now" to the autostait attiibute.) If we wanteu to change the client uefinition so that it hau an extia saveset - keeping usishaie, but auuing anothei one - say foi instance, "etc", using (D6&,+ oui woik woulu be twice as much effoit. Since an (D6&,+ commanu is an instiuction to '3$&6!"' to ieplace the value of an attiibute, you'u have to specify saveset values of both usishaie &'6 etc. Bowevei, to make life easiei foi us, we can insteau use the &DD+'6 commanu. 0ui entiie sequence is theiefoie: nsradmin> show Will show all attributes nsradmin> show name:; type:; save set: nsradmin> print type: NSR client; name: tara type: NSR client; name: tara.pmdg.lab; save set: /usr/share; nsradmin> append save set: /etc save set: /etc; Append? y updated resource id 74.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(5) nsradmin> print type: NSR client; name: tara.pmdg.lab; save set: /usr/share, /etc; Theie you go - a time saving upuate thanks to the &DD+'6 commanu. Since in this case, Winuows will be slightly uiffeient uue to the neeu to escape backslashes (i.e., use \\ insteau of \) anu keep paths in quotes, we'll look at how this woulu woik on a Winuows client as well: http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 26
#$%&'( D+ E9$;% 2F( 155(;= 7"CC1;= /$2F 3$;="/9 512F9 As an asiue, iemembei pieviously I saiu you coulun't &DD+'6 a value to a single-value attiibute. Beie's an example of what you'u get if you tiieu: nsradmin> print type: NSR group; name: Test type: NSR group; name: Test; nsradmin> append autostart: Start Now autostart: Start Now; Append? y append failed: autostart has too many values V%V R011&!M -9 [0M-.,# X,+3-9 L(*9(!0!1" So fai, we've ielieu on oui iesouices alieauy existing, anu we've just been mouifying them oi getting NetWoikei to peifoim specific actions with them. Now howevei, we want to look at #$+&,"'@ new iesouices. To uo this, we'ie going to setup the coie components that woulu typically be useu in a new NetWoikei configuiation, notably: 1. BiowseRetention Policies 2. Scheuules S. uioups 4. Clients S. Pools Rathei than using the NetWoikei Nanagement Console foi any of these, we'll uo the complete setup fiom within '3$&6!"'. V%V%B X#(5"0 ,!$ [010!1&(! 4(.&+&0" As you woulu know fiom using NetWoikei Nanagement Console, a policy is neithei a biowse, noi a ietention policy, until you go aheau anu assign it to the appiopiiate setting foi a client oi a pool. We'll setup both "Baily" anu "Nonthly" policies, with the policy uetails being: http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 27 Baily - Befining a peiiou of S weeks. Nonthly - Befining a peiiou of 1S months. When cieating a new NetWoikei iesouice anu you'ie not familiai with '3$&6!"', the easiest way to get a hanule on it is to look at an existing iesouice. We alieauy know fiom pievious sections that theie's a Nonth policy, so let's look at that again: nsradmin> print type: NSR policy; name: Month type: NSR policy; name: Month; comment: ; period: Months; number of periods: 1; So, this tells us of the attiibutes that we'ie going to neeu to set: type name peiiou numbei of peiious A quick way of seeing some of the peiiou ,<D+3 that aie available is to iestiict oui uisplay to just the peiiou, anu then view all policies: nsradmin> show period: nsradmin> print type: NSR policy period: Months;
period: Years;
period: Weeks;
period: Months;
period: Days;
period: Years; nsradmin> show Will show all attributes This won't always woik - sometimes the pieconfiguieu iesouices won't tell you enough infoimation. In those cases it's useful to iesoit to the commanu iefeience guiues. Foi instance, on 0nixLinux, you can view the uocumentation foi any iesouice type by iunning "man nsi_,<D+" - e.g., in this instance, "man nsi_policy". (These manual pages aie incluueu in the NetWoikei commanu iefeience uocumentation.) So, we want to cieate a Nonthly policy that gives a time peiiou of 1S months, anu a Baily policy that gives a time peiiou of S weeks. 0ui commanus will then be: nsradmin> create type: NSR policy; name: Daily; period: Weeks; number of periods: 5 type: NSR policy; name: Daily; period: Weeks; number of periods: 5; Create? y created resource id 120.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) nsradmin> create type: NSR policy; name: Monthly; period: Months; number of periods: 13 type: NSR policy; name: Monthly; http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 28 period: Months; number of periods: 13; Create? y created resource id 121.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) Note: You can see above that the commanu was spieau acioss two lines. Commanus that ueal with iesouices can eithei be specifieu as a single, veiy long line, oi as multiple lines, so long as theie's a semi-colon at the enu of each non-finishing line (i.e., each line finishes with "attiibute: value;") so that '3$&6!"' knows to expect moie input on the commanu. If you want to veiify that these have been cieateu, issue a piint commanu against them: nsradmin> print type: NSR policy; name: Monthly type: NSR policy; name: Monthly; comment: ; period: Months; number of periods: 13; nsradmin> print type: NSR policy; name: Daily type: NSR policy; name: Daily; comment: ; period: Weeks; number of periods: 5; That's oui policies setup anu now waiting foi clients anu pools to be associateu with them. V%V%@ R+E0$-.0" 0ui next stop is to configuie a Baily anu a Nonthly scheuule foi oui backups. These will woik as follows: ?1$68 97F(=&6( - Fulls on Fiiuay, inciementals the iest of the time, with the last Fiiuay of eveiy month skippeu to allow foi the Nonthly scheuule to iun. ,";2F68 97F(=&6( - Skips eveiy uay of the month, except foi the last Fiiuay of the month, wheie it uoes a full backup. If you've only evei woikeu with scheuules fiom within NNC, scheuules aie going to look a little peculiai to you in '3$&6!"'. Let's look at the Befault scheuule fiist: nsradmin> print type: NSR schedule; name: Default type: NSR schedule; name: Default; comment: ; period: Week; action: full incr incr incr incr incr incr; override: ; If you'ie wonueiing what these attiibutes aie foi: 5('$"= - Specifies the scheuule peiiou - eithei 1++., oi !%',;. This effectively uefines how the &#,"%' list is to be inteipieteu. 172$"; - A list of level backups to be peifoimeu on consecutive uays. Foi a 1++. scheuule, this action list coveis Sunuay thiough to Satuiuay, "' ,;&, %$6+$. Foi a month scheuule, the action list coveis the 1 st thiough to the S1 st , in that oiuei. ".(''$=( - Any special changes to the backup to suit paiticulai uates oi special uays. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 29 If you think cieating scheuules woulu have to be easiei in the u0I, I'll hopefully have you convinceu otheiwise once I take you thiough a seiies of shoit-cuts! Let's fiist consiuei the Baily scheuule that we want to cieate. We want: Fulls on Fiiuay Inciementals the iest of the time Skip the last Fiiuay eveiy month The fiist two iequiiements tianslate to attiibutes such that: 5('$"= is uefineu as "Week" 172$"; is uefineu as "inci inci inci inci inci full inci" We can take oui fiist shoit-cut heie, by the way - '3$&6!"' uoesn't neeu the full woiu foi each of those levels, so we can shoiten oui action list to "i i i i i f i" insteau. That's a lot less typing to stait with. The next shoit-cut though is oui oveiiiue. We 6%'4, want this scheuule to iun on the last Fiiuay of eveiy month. In tiauitional calenuai view cieation of scheuules in NNC, this woulu necessitate going thiough each month anu setting a manual oveiiiue on the final Fiiuay of eveiy month. Bowevei, like the non-calenuai view of NNC, '3$&6!"' suppoits a "set once" style oveiiiue heie, being: ".(''$=( uefineu as "skip last fiiuay eveiy month" So, oui cieate statement will look like the following: nsradmin> create type: NSR schedule; name: Daily; period: Week; action: i i i i i f i; override: skip last friday every month type: NSR schedule; name: Daily; period: Week; action: i i i i i f i; override: skip last friday every month; Create? y Next we have to cieate oui Nonthly scheuule, anu that's going to involve an auuitional shoitcut. You'll iecall we want oui Nonthly scheuule to: Skip eveiy uay of the month except foi the last Fiiuay of the month Bo a full backup on the last Fiiuay of the month You coulu, if you wanteu to, cieate an action list of "skip skip skip skip . skip" with S1 entiies in it. We alieauy know we can shoiten the level names, so you coulu at least shoiten it to "s s s s . s", with S1 instances of the lettei "s" insteau. Anothei way to go about it woulu be to change the peiiou type to "Week" anu then just use an action list with only 7 entiies in it: "s s s s s s s". That seems like a pietty goou shoit-cut - but theie's an even bettei shoit-cut yet. To get to that, we have to look at how the action list woiks. As I mentioneu befoie, foi a scheuule of peiiou type "Nonth", the action list is typically uefineu as having S1 entiies. What, you might ask, happens if the scheuule is uefineu foi S1 uays howevei anu the month it is evaluateu foi only has Su, 29 oi 28 uays. Well in these instances, any "extia" uays in the action list aie ignoieu. Theie's no S1 Febiuaiy, evei, so the S1 st entiy in an action list will nevei be evaluateu in Febiuaiy. Taking the opposite appioach to this, action lists also suppoit I+1+$ entiies than the uefineu time peiiou, too. If you wanteu foi instance to cieate a backup scheuule that uiu a full backup eveiy uay, iathei than liteially uefining youi action list as "full full full full full full full", you can insteau uefine it just as "full". In this case, when NetWoikei evaluates the scheuule, if the action list is smallei than the uefineu peiiou, it will simply keep on looping the action list on top of itself until it builus up an action list that matches the http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page Su uefineu peiiou. So it woulu instantiate "full" to "full full full full full full full" without any auuitional effoit on youi pait. We can use that loopfill action list behavioui as an "ultimate" shoit-cut to cieating the Nonthly scheuule, anu so oui cieate commanu will become: nsradmin> create type: NSR schedule; name: Monthly; period: Month; action: s; override: full last friday every month type: NSR schedule; name: Monthly; period: Month; action: s; override: full last friday every month; Create? y created resource id 124.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) Theie you have it - a Nonthly scheuule that uoes exactly what we want cieateu in minimal time. This is one of those iaie cases wheie it's paiticulaily useful to see in NNC that what we uiu woikeu coiiectly:
V%V%G 8#(-9" Now that we've cieateu oui scheuules, we can move on to cieate oui gioups, since foi the puiposes of oui example, we want to foice all clients that backup as pait of the gioup to iun the same level each uay. As foi when we cieateu the policies anu the scheuules, we'll want to check out an existing gioup fiist to see what its settings aie. Rathei than using oui cuiient "Test" gioup, which will contain a bunch of auuitional infoimation iegaiuing iecent backups, we'll pick a gioup that shoulun't have hau a backup yet - the Befault gioup: nsradmin> print type: NSR group; name: Default type: NSR group; name: Default; comment: ; snapshot: False; autostart: Disabled; autorestart: Disabled; start time: "3:33"; last start: ; last end: ; interval: "24:00"; restart window: "12:00"; force incremental: Yes; savegrp parallelism: 0; client retries: 1; clones: No; clone pool: Default Clone; success threshold: Warning; options: ; level: ; http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S2 printer: ; schedule: ; schedule time: ; expiration time: ; inactivity timeout: 30; File inactivity threshold: 30; File inactivity alert threshold: 30; work list: ; completion: ; status: idle; Snapshot Policy: Daily; Snapshot Pool: Default; probe based group: False; probe interval: 60; probe start time: "0:00"; probe end time: "23:59"; probe success criteria: all; time since successful backup: 0; time of the last successful backup: ; We want to cieate two gioups. 0ui Baily gioup will stait at 21:SS, use the "Baily" scheuule, anu be configuieu to automatically stait. So the attiibutes we want to set when cieating aie: 285( - NSR gioup ;1C( - Baily 1&2"921'2 - Enableu 921'2 2$C( - "21:SS" 97F(=&6(: Baily Theie aie two things to note about the stait time. The fiist, obviously, is that oui stait time is in the evening; that's because the scheuule we'ie assigning to the gioup has full backups iun on a Fiiuay, so we'ie talking about staiting gioups aftei the business uay iathei than befoie the business uay. The seconu, anu fai moie impoitant thing to note about the stait time is that it's specifieu within uouble- quotes. The ieason foi this is that the colon (:) is a special chaiactei foi '3$&6!"', being useu as a sepaiatoi between an attiibute name anu its value. Theiefoie, if a value incluues the colon chaiactei, the value must be in uouble quotes. So oui cieate commanu foi the Baily gioup will be: nsradmin> create type: NSR group; name: Daily; autostart: Enabled; start time: "21:35"; schedule: Daily type: NSR group; name: Daily; autostart: Enabled; start time: "21:35"; schedule: Daily; Create? y created resource id 125.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) 0ui cieate commanu foi the Nonthly gioup will be ieasonably similai, beaiing in minu that it shoulu not stait at +R&#,)< the same time as the Baily gioup, anu it will neeu to use the Nonthly scheuule: nsradmin> create type: NSR group; name: Monthly; autostart: Enabled; start time: "21:40"; schedule: Monthly type: NSR group; name: Monthly; autostart: Enabled; start time: "21:40"; schedule: Monthly; http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page SS Create? y created resource id 126.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) Noimally we'u also configuie cloning, but we neeu to have pools setup foi that, so we'll come back to that in a little while. V%V%Q L.&0!1" 0ui next step is to cieate a couple of clients. Foi the puiposes of this sample configuiation, we won't woiiy about having ieal clients. Insteau, setup the ;%3,3 file on youi NetWoikei seivei with entiies such as: 10.117.118.119 test1 test1.my.lab 10.117.118.120 test2 test2.my.lab The above subnet is a D$"J&,+ one, so shoulun't inteifeie with anything else. Check howevei befoie setting up these entiies that these auuiesses ieally uon't appeai on youi netwoik. If they uo, choose anothei set of entiies in an empty 1u.X.Y subnet. 0n 0nixLinux systems, you can setup these entiies by euiting etchosts; on a Winuows system, the file will be typically be founu in the "systemS2\uiiveis\etc" uiiectoiy, nameu "hosts". (0n a stanuaiu install of Winuows 2uuS, foi instance, you shoulu expect to finu the local hosts file with a full path of C:\winuows\systemS2\uiiveis\etc\hosts.) Next, we neeu to cieate these clients within NetWoikei. We will follow the newei style of setting up clients in NetWoikei, wheie each client belongs to P%,; gioups, using the longei biowseietention peiiou, anu the appiopiiate pool having the coiiect ietention peiiou specifieu as an oveiiiue. Again we'll look at an existing client iesouice to get an iuea of the soits of settings we'll want to specify. In this case, we'll look at the cuiient client in the Test gioup - theie shoulu be only one, the one foi oui backup seivei itself: nsradmin> print type: NSR client; group: Test type: NSR client; name: tara.pmdg.lab; server: tara.pmdg.lab; client id: \ 923bf5a2-00000004-4b37bc9b-4b37bc9a-00011c00-dfb3d342; scheduled backup: Enabled; comment: ; Save operations: ; archive services: Disabled; schedule: Default; browse policy: Month; retention policy: Year; statistics: elapsed = 102253, index size (KB) = 40244, amount used (KB) = 40244, entries = 263529; directive: ; group: Test; save set: /usr/share, /etc; Backup renamed directories: Disabled; priority: 500; File inactivity threshold: 0; File inactivity alert threshold: 0; remote access: ; remote user: ; password: ; backup command: ; application information: ; ndmp: No; http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S4 NDMP array name: ; De-duplication backup: No; De-duplication node: ; Probe resource name: ; virtual client: No; physical host: ; Proxy backup type: ; Proxy backup host: ; executable path: ; server network interface: ; aliases: tara, tara.pmdg.lab; index path: ; owner notification: ; parallelism: 12; archive users: ; storage nodes: nsrserverhost; recover storage nodes: ; clone storage nodes: ; hard links: Disabled; short filenames: Disabled; BMR: Disabled; BMR options: ; backup type: ; client OS type: Linux; CPUs: 1; NetWorker version: 7.5.1.Build.413; enabler in use: Yes; licensed applications: ; licensed PSPs: ; Theie's a lot of attiibutes theie (anu that's with uynamichiuuen attiibutes tuineu %II), anu we uon't have to set all of those touay. We'll just limit ouiselves to: type name biowse policy ietention policy gioup save set paiallelism aliases As you may have guesseu by now - NetWoikei will fill in attiibutes that you leave out when the iesouice is cieateu. This is quite hanuy, anu woiks the same way that iesouice cieation uoes within NetWoikei Nanagement Console. Looking at oui fiist client, test1, oui cieate commanu will be: nsradmin> create type: NSR client; name: test1; browse policy: Monthly; retention policy: Monthly; group: Daily, Monthly; save set: All; parallelism: 1; aliases: test1, test1.my.lab type: NSR client; name: test1; browse policy: Monthly; retention policy: Monthly; group: Daily, Monthly; save set: All; aliases: test1, test1.my.lab; parallelism: 1; Create? y http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page SS created resource id 127.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) 0ui seconu client can be cieateu with a similai commanu: nsradmin> create type: NSR client; name: test2; browse policy: Monthly; retention policy: Monthly; group: Daily, Monthly; save set: All; parallelism: 1; aliases: test2, test2.my.lab type: NSR client; name: test2; browse policy: Monthly; retention policy: Monthly; group: Daily, Monthly; save set: All; aliases: test2, test2.my.lab; parallelism: 1; Create? y created resource id 128.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) While not all of these attiibutes aie iequiieu, it's woithwhile when cieating clients being in the habit of &, )+&3, specifying the above. It foices you, foi instance, to conuuct peifoimance tuning on the client backups by staiting with a paiallelism of 1, anu ieminus you to think about the uiffeient aliases a host may have. V%V%T 4((." 0ui next-to-last components to be setup aie the pools. We'll uefine I%($ pools - Baily, Baily Clone, Nonthly anu Nonthly Clone. Bon't woiiy; these pools aie foi uemonstiation puiposes only, so we won't neeu a bunch of auuitional uisk backup units oi meuia. Let's stait, as we always uo, by looking at an existing pool. In this case, we'll look at the Befault pool: nsradmin> print type: NSR pool; name: Default type: NSR pool; name: Default; comment: ; enabled: Yes; pool type: Backup; label template: Default; retention policy: ; groups: ; clients: ; save sets: ; levels: ; devices: ; store index entries: Yes; auto media verify: No; Recycle to other pools: No; Recycle from other pools: No; volume type preference: ; max parallelism: 0; mount class: default; WORM pool: No; create DLTWORM: No; barcode prefix: ; As is always the case, theie's a bunch of attiibutes in a pool that foi iegulai setups we uon't neeu to consiuei. Foi oui setup though, we'll neeu to pioviue settings foi: type name http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S6 enableu pool type gioups ietention policy stoie inuex entiies auto meuia veiify Recycle to othei pools Recycle fiom othei pools The last two entiies, noimally tuineu off foi pools, aie useu to ieplace the neeu foi a Sciatch pool within NetWoikei. Rathei than putting meuia in one "special" pool to subsequently pull out when meuia is neeueu in anothei pool, NetWoikei allows us to specify that pools can take (iecyclable) meuia fiom othei pools, anu uonate iecyclable meuia to othei pools. The thiiu last option, &(,% !+6"& J+$"I< shoulu be something that you tuin on foi most, if not all pools. Foi a small peifoimance hit, it actually uoes veiification ieaus on paits of savesets, making it a poweiful tool in ensuiing youi backups aie iecoveiable. (0i iathei, at least confiiming that the meuia is ieauable.) The "stoie inuex entiies" is noimally "on" foi a pool, anu that's fine foi oui backup pools, but when we make oui backup clone pools, it will neeu to be off. So, let's fiist look at oui Baily pool, anu how it is cieateu: nsradmin> create type: NSR pool; name: Daily; enabled: Yes; pool type: Backup; groups: Daily; auto media verify: Yes; recycle to other pools: Yes; recycle from other pools: Yes; retention policy: Daily type: NSR pool; name: Daily; enabled: Yes; pool type: Backup; retention policy: Daily; groups: Daily; auto media verify: Yes; recycle to other pools: Yes; recycle from other pools: Yes; Create? y created resource id 129.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) Note - if you get an aleit about neeuing a label template, oi to ie-cieate the iesouice to automatically cieate a label template - it's time to upgiaue to a moie iecent veision of NetWoikei! 0ui Baily Clone pool will be quite similai - but we 6%'4, specify any gioups foi a Clone pool, anu we tell NetWoikei not to stoie inuex entiies foi it: nsradmin> create type: NSR pool; name: Daily Clone; enabled: Yes; pool type: Backup Clone; store index entries: No; auto media verify: Yes; recycle to other pools: Yes; recycle from other pools: Yes; retention policy: Daily type: NSR pool; name: Daily Clone; enabled: Yes; pool type: Backup Clone; retention policy: Daily; store index entries: No; auto media verify: Yes; recycle to other pools: Yes; recycle from other pools: Yes; Create? y created resource id 130.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S7 0ui Nonthly, anu Nonthly Clone pools will be quite similai, with the appiopiiate basic mouifications, namely: 1. Foi the Nonthly Pool, the gioup changes fiom "Baily" to "Nonthly". 2. Foi both the Nonthly anu Nonthly Clone pools, the ietention policy changes fiom "Baily" to "Nonthly". 0ui cieate commanus will theiefoie iesemble: nsradmin> create type: NSR pool; name: Monthly; enabled: Yes; pool type: Backup; groups: Monthly; auto media verify: Yes; recycle to other pools: Yes; recycle from other pools: Yes; retention policy: Monthly type: NSR pool; name: Monthly; enabled: Yes; pool type: Backup; retention policy: Monthly; groups: Monthly; auto media verify: Yes; recycle to other pools: Yes; recycle from other pools: Yes; Create? y created resource id 131.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) nsradmin> create type: NSR pool; name: Monthly Clone; enabled: Yes; pool type: Backup Clone; store index entries: No; auto media verify: Yes; recycle to other pools: Yes; recycle from other pools: Yes; retention policy: Monthly type: NSR pool; name: Monthly Clone; enabled: Yes; pool type: Backup Clone; retention policy: Monthly; store index entries: No; auto media verify: Yes; recycle to other pools: Yes; recycle from other pools: Yes; Create? y created resource id 132.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) We'ie almost theie! The last thing we have to uo is mouify oui gioups to automatically clone, which we'll uo by going back to oui gioups, below. V%V%V [0O&"&1&!M (-# 8#(-9" Now that oui pools have been establisheu, we can mouify the Baily gioup to clone to the Baily Clone pool, anu the Nonthly gioup to clone to the Nonthly Clone pool. We've pieviously uone this when we configuieu the Test gioup to clone, so this piocess shoulu be ielatively stiaightfoiwaiu: nsradmin> show name:; clones:; clone pool: nsradmin> print type: NSR group; name: Daily name: Daily; clones: No; clone pool: Default Clone; nsradmin> update clones: Yes; clone pool: Daily Clone clone pool: Daily Clone; clones: Yes; Update? y updated resource id 125.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(2) nsradmin> print type: NSR group; name: Monthly name: Monthly; http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S8 clones: No; clone pool: Default Clone; nsradmin> update clones: Yes; clone pool: Monthly Clone clone pool: Monthly Clone; clones: Yes; Update? y updated resource id 126.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(2) At this point, we've completeu a stanuaiu setup piocess coveiing policies, scheuules, gioups, clients anu pools. V%N \(!&1(#&!M >0O&+0" Anothei basic activity that you shoulu know how to uo with '3$&6!"' is monitoiing uevices while activities aie cuiiently iunning. This is ielatively easy, anu is hanuy to know how to uo. Let's look at a uevice. If you'ie on 0nixLinux, the commanu (anu output) shoulu be along the following lines: nsradmin> print type: NSR device; name: /backup1 type: NSR device; name: /backup1; comment: ; description: ; message_I18N: "writing, done "; message: "writing, done "; volume name: Backup.001; media family: disk; media type: adv_file; enabled: Yes; read only: No; target sessions: 4; max sessions: 512; parent jukebox: ; cleaning required: No; cleaning interval: ; date last cleaned: ; auto media management: No; ndmp: No; dedicated storage node: No; remote user: ; password: ; hardware id: ; CDI: Not used; TapeAlert Critical: ; TapeAlert Warning: ; TapeAlert Information: ; WORM capable: No; DLTWORM capable: No; WORM cartridge present: No; device serial number: ; 0n Winuows, change the name fiom "backup1" to "X:\\NSR\\u1", wheie X was the uiive lettei wheie the uisk backup units weie cieateu. Foi example, this might iesemble the following: http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S9
#$%&'( J+ K$(/$;% 1 =(.$7( '(9"&'7( $; 3$;="/9 The fielus in paiticulai that we want to look at when monitoiing uevices aie: message message_I18N What we'll now uo is iestait out Z+3, gioup fiom befoie, anu monitoi what the uevices uo, both on backup, then clone. To uo this, we'll iun thiough the following steps: 1. Stait the Test gioup. 2. 0puate oui show commanu to just show name, message, anu message_I18N. S. Piint (anu set the queiy foi) the cuiient uevices. 4. Peiiouically ie-piint the status uuiing the backup. This will iesemble the following: nsradmin> . type: NSR group; name: Test Current query set nsradmin> update autostart: Start Now autostart: Start Now; Update? y updated resource id 115.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(38) nsradmin> show name:; message:; message_I18N nsradmin> print type: NSR device name: /backup1; message_I18N: "writing at 16 MB/s, 100 MB, 2 sessions"; message: "writing at 16 MB/s, 100 MB, 2 sessions";
name: /backup2/_AF_readonly; message_I18N: space recovered from volume Clone.001.RO; message: space recovered from volume Clone.001.RO;
name: /backup2; message_I18N: "writing at 49 MB/s, 98 MB"; message: "writing at 49 MB/s, 98 MB"; (Note - if you aie woiking in an English-only enviionment, you can choose to leave off the message_I18N attiibute fiom youi show commanu.) As you can see by this - even if you have a NetWoikei seivei iunning on Winuows anu can't get to NNC, you can at least check to see what the uevices aie uoing. V%P >0.01&!M [0"(-#+0" 0ui last basic exeicise sees us ueleting oui BailyNonthly setup. This not only uemonstiates the 6+)+,+ commanu, but also leaves you in a position to ieattempt any of the exeicises in the pievious section if necessaiy. Theie's two ways that the uelete commanu can woik: Run by itself, 6+)+,+, it will offei to uelete the iesouices that match the cuiiently set queiy. Run with a queiy, 6+)+,+ W(+$< set the cuiient queiy anu offei to uelete the iesouices that match that just-set queiy. If you'ie wonueiing which you shoulu use, I'll tell you now that I ;(.(' iun uelete without specifying a queiy as well. Regaiuless of whethei it is suppoiteu oi not, I veiy stiongly iecommenu against uoing so. All examples pioviueu heie will woik fiom pioviuing the queiy with the uelete commanu. As you might imagine, NetWoikei (usually) uoesn't let you uelete iesouices that have uepenuencies. Foi instance, you can't uelete a gioup if it is still iefeienceu by a pool, etc. So sometimes, in oiuei to uelete, we have to backtiack pait of the configuiation. The fiist iesouices that we can uelete though aie the clients - these aien't nameu anywheie else, so it's safe to get iiu of them with the commanus: nsradmin> show name:; save set:; group: nsradmin> delete type: NSR client; group: Daily name: test1; group: Daily, Monthly; save set: All; Delete? y deleted resource id 127.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 41 name: test2; group: Daily, Monthly; save set: All; Delete? y deleted resource id 128.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) You'll note theie that we uiun't issue a uelete commanu foi each client, but iathei, on an attiibute we knew to be unique foi all of the clients we neeueu to uelete - in this case, belonging to the Baily gioup. Noving on, it woulu be hanuy if we ueleteu oui gioups - Baily anu Nonthly. Bowevei, these cuiiently belong to the Baily anu Nonthly pools - if we tiy to unassign those gioups fiom the pools, we'll get in tiouble fiom NetWoikei since pools must have unique attiibutes - e.g.,: nsradmin> show name:; enabled:; groups: nsradmin> print type: NSR pool; name: Daily name: Daily; enabled: Yes; groups: Daily; nsradmin> update groups: groups: ; Update? y update failed: There must be at least one selection criterion (groups, clients, save sets or levels) set when creating or updating a non-clone pool. You'll note theie that I useu the special way of #)+&$"'@ an attiibute: update groups: Theie's an attiibute theie, but no value. That's how you take the cuiient value away fiom an attiibute without putting in a new one. (Now, in this case, because of pool configuiation iequiiements, we weien't alloweu to uo that, but it's woith knowing how to uo this.) So, we'll fiist neeu to uelete oui Baily anu Nonthly pools: nsradmin> delete type: NSR pool; name: Monthly name: Monthly; enabled: Yes; groups: Monthly; Delete? y deleted resource id 131.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) nsradmin> delete type: NSR pool; name: Daily name: Daily; enabled: Yes; groups: Daily; Delete? y deleted resource id 133.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) In oluei veisions of NetWoikei, you might have hau to then go anu cleai the Baily Clone anu Nonthly Clone pools fiom the Baily anu Nonthly gioups, but newei veisions of NetWoikei will unfoitunately allow you to uelete the Clone pool while still having it iefeienceu! nsradmin> delete type: NSR pool; name: Daily Clone name: Daily Clone; enabled: Yes; groups: ; Delete? y deleted resource id 130.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) nsradmin> delete type: NSR pool; name: Monthly Clone http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 42 name: Monthly Clone; enabled: Yes; groups: ; Delete? y deleted resource id 132.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) Now we can move on to ueleting the gioups, which means we'ie heauing into the home stietch: nsradmin> show Will show all attributes nsradmin> show name:; clones:; clone pool: nsradmin> delete type: NSR group; name: Daily name: Daily; clones: Yes; clone pool: Daily Clone; Delete? y deleted resource id 125.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(2) nsradmin> delete type: NSR group; name: Monthly name: Monthly; clones: Yes; clone pool: Monthly Clone; Delete? y deleted resource id 126.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(2) If you weie wonueiing what woulu happen if NetWoikei goes to iun one of those gioups, anu then clone but the pool uoesn't exist - the clone will fail. It's a situation best to be avoiueu. With the gioups, pools, anu clients out of the way, we can now push thiough anu uelete oui scheuules: nsradmin> delete type: NSR schedule; name: Daily name: Daily; Delete? y deleted resource id 123.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) nsradmin> delete type: NSR schedule; name: Monthly name: Monthly; Delete? y deleted resource id 124.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) You'll note theie that the "show" commanu pieviously issueu is still in effect; howevei, of the thiee attiibutes configuieu to be shown - name, clones anu clone pool, only "name" is valiu foi a scheuule, so only "name" is shown. We'll tuin the show iestiictions back off to uelete oui policies: nsradmin> show Will show all attributes nsradmin> delete type: NSR policy; name: Daily type: NSR policy; name: Daily; comment: ; period: Weeks; number of periods: 5; Delete? y deleted resource id 120.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) nsradmin> delete type: NSR policy; name: Monthly type: NSR policy; name: Monthly; comment: ; period: Months; number of periods: 13; Delete? y deleted resource id 121.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 4S Theie you have it - we've now backtiackeu out of all the components we setup foi oui BailyNonthly configuiation. V%S L.("&!M L(**0!1" When it comes to '3$&6!"', piactice makes peifect. If anything in this section hasn't maue sense, oi you want to iepeat it, be suie to follow the steps in the pievious section - 6.8, "Beleting Resouices" (staiting page 4u), in oiuei to ieset the NetWoikei configuiation to tiy again. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 44 N J$O,!+0$ !"#,$*&! N%B D!1#($-+1&(! 0ui pievious chaptei (6, "0peiational Basics", staiting page 12) gave a ieasonably thoiough oveiview to how one woiks with '3$&6!"' as pait of an inteiactive session. This chaptei will piimaiily ueal with ways that one can inteiact with '3$&6!"' in a non-inteiactive moue. The natuie of auvanceu '3$&6!"' usage is that what you uo in it will uepenu +',"$+)< on youi local ciicumstances. Theiefoie, this chaptei will be shoitei than the pievious chaptei. That uoesn't ieflect that theie's not many auvanceu things you can uo with '3$&6!"', but insteau moie that those auvanceu things will neeu <%( to ueciue what to uo. N%@ X-.3 J+1&O&1&0" 0ui fiist auvanceu use foi '3$&6!"' is in P(). activities. Let's say that an auuitional 2u seiveis aie going to be auueu to youi enviionment. They'll all be stanuaiu systems without uatabases, which means that eithei fiom using NNC, oi '3$&6!"' in inteiactive moue, theie's going to be a lot of teuious woik in setting them up. Bowevei, we can uo it as a non-inteiactive '3$&6!"' session faiily quickly, using a combination of copypaste anu quick euiting in a text file. To stait with, we'ie obviously going to neeu host entiies again - NetWoikei won't let us cieate clients without a means of iesolving them, anu the easiest way to get iesolution iunning foi a lab situation is to populate the hosts file. Pieviously we uiscusseu setting up hosts entiies of the foim: 10.117.118.119 test1 test1.my.lab 10.117.118.120 test2 test2.my.lab Now, let's setup anothei 18, so that they ieau: 10.117.118.119 test1 test1.my.lab 10.117.118.120 test2 test2.my.lab 10.117.118.121 test3 test3.my.lab 10.117.118.122 test4 test4.my.lab 10.117.118.123 test5 test5.my.lab 10.117.118.124 test6 test6.my.lab 10.117.118.125 test7 test7.my.lab 10.117.118.126 test8 test8.my.lab 10.117.118.127 test9 test9.my.lab 10.117.118.128 test10 test10.my.lab 10.117.118.129 test11 test11.my.lab 10.117.118.130 test12 test12.my.lab 10.117.118.131 test13 test13.my.lab 10.117.118.132 test14 test14.my.lab 10.117.118.133 test15 test15.my.lab 10.117.118.134 test16 test16.my.lab 10.117.118.135 test17 test17.my.lab 10.117.118.136 test18 test18.my.lab 10.117.118.137 test19 test19.my.lab 10.117.118.138 test20 test20.my.lab http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 4S Foi the puiposes of oui example only, we'll use some moie "Befault" settings in NetWoikei. In a ieal- woilu situation, we'u alieauy have gioups, scheuules, pools, etc., setup. So insteau of going thiough anu setting all these up, we'll just specify the name, aliases anu paiallelism, anu iely on NetWoikei to establish the biowseietention policy as well as the gioup foi us. Next, cieate a text file that contains the following lines: create type: NSR client; name: test1; aliases: test1, test1.my.lab; parallelism: 1 create type: NSR client; name: test2; aliases: test2, test2.my.lab; parallelism: 1 create type: NSR client; name: test3; aliases: test3, test3.my.lab; parallelism: 1 create type: NSR client; name: test4; aliases: test4, test4.my.lab; parallelism: 1 create type: NSR client; name: test5; aliases: test5, test5.my.lab; parallelism: 1 create type: NSR client; name: test6; aliases: test6, test6.my.lab; parallelism: 1 create type: NSR client; name: test7; aliases: test7, test7.my.lab; parallelism: 1 create type: NSR client; name: test8; aliases: test8, test8.my.lab; parallelism: 1 create type: NSR client; name: test9; aliases: test9, test9.my.lab; parallelism: 1 create type: NSR client; name: test10; aliases: test10, test10.my.lab; parallelism: 1 create type: NSR client; name: test11; aliases: test11, test11.my.lab; parallelism: 1 create type: NSR client; name: test12; aliases: test12, test12.my.lab; parallelism: 1 create type: NSR client; name: test13; aliases: test13, test13.my.lab; parallelism: 1 create type: NSR client; name: test14; aliases: test14, test14.my.lab; parallelism: 1 create type: NSR client; name: test15; aliases: test15, test15.my.lab; parallelism: 1 create type: NSR client; name: test16; aliases: test16, test16.my.lab; parallelism: 1 create type: NSR client; name: test17; aliases: test17, test17.my.lab; parallelism: 1 create type: NSR client; name: test18; aliases: test18, test18.my.lab; parallelism: 1 create type: NSR client; name: test19; aliases: test19, test19.my.lab; parallelism: 1 create type: NSR client; name: test20; aliases: test20, test20.my.lab; parallelism: 1
Save the file as "bulk-cieate.nsii". (Incluue a blank line at the bottom of the commanu file, so that iegaiuless of which opeiating system you'ie on, theie won't be any issues to uo with enu-of-file points.) Now, in the pievious section, eveiy time we've gone to cieate iesouices in NetWoikei, we've been piompteu to confiim, "yes" to go aheau anu cieate each iesouice. This isn't the case when we iun in non- inteiactive moue. To invoke '3$&6!"' in non-inteiactive moue, simply iun: # nsradmin -i file Wheie "file" is the path to the file anu its name. Note that while not manuatoiy, it is iecommenueu to supply this as an absolute, iathei than ielative path, as at vaiious times theie have been bugs in '3$&6!"' that have causeu it to fail when being invokeu with a commanu file oi uatabase fiom a ielative path. In this case, assuming we've saveu the file as S,!DSP().[#$+&,+8'3$", anu we'ie not in that uiiectoiy, we'u simply iun: [root@tara ~]# nsradmin -i /tmp/bulk-create.nsri created resource id 134.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 135.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 136.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 137.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 138.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 139.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 140.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 141.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 142.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 143.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 144.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 145.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 146.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 147.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 46 created resource id 148.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 149.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 150.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 151.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 152.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 153.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) Theie you have it. With veiy little piepaiation time, you've auueu 2u clients to a NetWoikei configuiation. Not even NetWoikei Fast Stait will get you that level of speeu saving! Backing out of this configuiation change is veiy easy using bulk opeiations as well. Let's cieate a text file now that has the following content: delete type: NSR client; name: test1 delete type: NSR client; name: test2 delete type: NSR client; name: test3 delete type: NSR client; name: test4 delete type: NSR client; name: test5 delete type: NSR client; name: test6 delete type: NSR client; name: test7 delete type: NSR client; name: test8 delete type: NSR client; name: test9 delete type: NSR client; name: test10 delete type: NSR client; name: test11 delete type: NSR client; name: test12 delete type: NSR client; name: test13 delete type: NSR client; name: test14 delete type: NSR client; name: test15 delete type: NSR client; name: test16 delete type: NSR client; name: test17 delete type: NSR client; name: test18 delete type: NSR client; name: test19 delete type: NSR client; name: test20
Assuming this has been saveu as S,!DSP().[6+)+,+8'3$", you can iun: [root@tara ~]# nsradmin -i /tmp/bulk-delete.nsri deleted resource id 134.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 135.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 136.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 137.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 138.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 139.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 140.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 141.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 142.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 143.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 144.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 145.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 146.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 147.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 148.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 149.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 150.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 151.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 152.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) deleted resource id 153.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) As you can see, bulk upuates aie ielatively stiaightfoiwaiu. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 47 N%G R+#&91&!M 5&1E !"#,$*&! N%G%B D!10!$0$ 8(,. Let's say you iun an enviionment wheie you want the suppoit staff iesponsible foi setting up new seiveis to be able to have simple commanus they can iun to inteiactively fill in the uetails iequiieu foi new clients within NetWoikei. This means being able to sciipt with youi NetWoikei seivei. !"2(: Foi the examples below sciipts will be kept as basic as possible, peifoiming no input valiuation, etc. Foi moie compiehensive sciipting of '3$&6!"', you aie auviseu to (a) use a "goou" sciipting language, such as Peil oi Python (iathei than say, B0S shell sciipting), anu (b) peifoim input valiuation to ensuie that the values you feeu thiough to '3$&6!"' aie acceptable. N%G%@ D!1#($-+1(#; "+#&91&!M We'll stait with something a little less ambitious, as a test case. Consiuei a scenaiio wheie (foi some ieason), you want a sciipt that will cieate a new uay-baseu policy foi you aftei you supply a policy name anu a numbei of uays. 0n Winuows, you might call this sciipt "cieate-policy.bat" anu it woulu have the following content: @echo off echo Creating a new policy set /p name="Enter policy name: " set /p days="Enter number of days: "
nsradmin -i command.nsri del command.nsri Running this might iesult in a session such as the following:
#$%&'( L+ E9$;% 2F( 7'(12(M5"6$78NA12 97'$52 "; 3$;="/9 http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 48 0n 0nix systems, using Peil, we coulu uo a similai function with the following sciipt, nameu "cieate- policy.pl" anu maue executable: #!/usr/bin/perl -w
print "Enter number of days: "; my $numDays = <>; chomp $numDays;
if (open(CMD,">command-$$.nsri")) { print CMD "create type: NSR policy; name: $policyName;\n"; print CMD "period: Days; number of periods: $numDays\n"; print CMD "print type: NSR policy; name: $policyName\n"; close(CMD); system("nsradmin -i command-$$.nsri"); unlink("command-$$.nsri"); } else { die "Unable to create command-$$.nsri\n"; } The output fiom such a sciipt might iesemble the following: [root@tara ~]# ./create-policy.pl Enter policy name: Leap Year Enter number of days: 366 created resource id 154.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) type: NSR policy; name: Leap Year; comment: ; period: Days; number of periods: 366; N%G%G 4#0.&*&!,#; R01-9 In oiuei foi a client cieation sciipt to woik, we have to woik on the basis of theie being a bunch of iesouices alieauy piesent - pools, gioups anu scheuules aie a goou stait. To make things easiei, we'll piesent all the commanus below foi iecieating the BailyNonthly setup uiscusseu in Chaptei 6, "0peiational Basics", (staiting page 12), plus a couple of extia iesouices. Cieate a new text file calleu "#$+&,+[$+3%($#+38'3$"", with the following content: create type: NSR policy; name: Daily; period: Weeks; number of periods: 5 create type: NSR policy; name: Monthly; period: Months; number of periods: 13
create type: NSR schedule; name: Daily; period: Week; action: i i i i i f i; override: skip last friday every month create type: NSR schedule; name: Monthly; period: Month; action: s; override: full last friday every month
create type: NSR pool; name: Daily; enabled: Yes; pool type: Backup; groups: Daily, Daily MSSQL; auto media verify: Yes; recycle to other pools: Yes; recycle from other pools: Yes; retention policy: Daily create type: NSR pool; name: Monthly; enabled: Yes; pool type: Backup; groups: Monthly, Monthly MSSQL; auto media verify: Yes; recycle to other pools: Yes; recycle from other pools: Yes; retention policy: Monthly create type: NSR pool; name: Daily Clone; enabled: Yes; pool type: Backup Clone; auto media verify: yes; recycle to other pools: Yes; recycle from other pools: Yes; retention policy: Daily; store index entries: No create type: NSR pool; name: Monthly Clone; enabled: Yes; pool type: Backup Clone; auto media verify: yes; recycle to other pools: Yes; recycle from other pools: Yes; retention policy: Monthly; store index entries: No
!"2(: You can uownloau pie-cieateu files fiom the website that contain the above '3$&6!"' commanus. A single zip file containing both a 0nix foimat file anu a Winuows foimat file can be ietiieveu fiom: F225+OO;9'=N$;0"OC$7'"C1;&169O'(9"&'7(9O;9'1=C$;OPGGQ7'(12(NR$5 When iun, this will piouuce output along the lines of: [root@tara ~]# nsradmin -i create-resources.nsri created resource id 165.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 166.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 167.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 168.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 169.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 170.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 171.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 172.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 173.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 174.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 175.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 176.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) Current query set updated resource id 169.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(2) Current query set updated resource id 170.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(2) Current query set updated resource id 171.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(2) Current query set updated resource id 172.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(2)
http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page Su N%G%Q J L.&0!1 L#0,1&(! R+#&91 Now that we've got a basic sciipt uone, let's look at a sciipt foi auuing new clients. This time, let's look at the sciipt in 0nixLinux fiist. It might iesemble the following: #!/usr/bin/perl -w
use strict;
my $hostname = "tara"; print "Enter new client name: "; my $newClient = <>; chomp $newClient;
print "Should new client have MSSQL module enabled? (y/n) "; my $module = <>; chomp $module;
system("nsradmin -i new-client-$$.nsri"); unlink("new-client-$$.nsri"); } else { die "Could not create new-client-$$.nsri\n"; } Be suie to change the NetWoikei seivei hostname in the line 'my $hostname = "$%#%"' to the name of youi lab NetWoikei seivei. Sample iun sessions fiom the above sciipt might look like the following: [root@tara ~]# ./create-client.pl Enter new client name: test11 Should new client have MSSQL module enabled? (y/n) y created resource id 181.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 182.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1)
[root@tara ~]# ./create-client.pl Enter new client name: test13 Should new client have MSSQL module enabled? (y/n) n created resource id 183.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) In the fiist session, you'll note that two iesouices weie cieateu - one foi the filesystem backup, the othei foi the SQL seivei backup. In the seconu session, only the filesystem backup instance was cieateu. Next, let's look at the sciipt iequiieu foi client cieation on Winuows. @echo off set server=cyclops
http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S1 echo Creating a new client set /p name="Enter new client name: " set /p module="Should new client have MSSQL module enabled? (y/n) "
nsradmin -i command.nsri del command.nsri Be suie to change the NetWoikei seivei hostname in the line 'set seivei=&'&()*+' to the name of youi lab NetWoikei seivei. With the sciipt cieateu anu saveu as "cieate-client.bat", sample iun session iesults aie as follows:
#$%&'( P+ :&25&2 0'"C 2F( S7'(12(M76$(;2NA12S 97'$52 "; 3$;="/9 N%Q L(!!0+1&!M 1( 1E0 L.&0!1 R0#O&+0" So fai, we've concentiateu on connecting to the NetWoikei 3+$J+$ uaemons. Bowevei, '3$&6!"' suppoits connecting to othei NetWoikei seivices as well - most notably the client seivices. If you'll iecall the oiiginal usage output foi '3$&6!"''s usage uetails, you'll iemembei it looks like this: [root@tara ~]# nsradmin -? usage: nsradmin [-c] [-i file] [-s server] [-p {prognum | progname} ] [-v version] [query]... usage: nsradmin [-c] [-i file] [-d resdir] [-t typefile] ... [query]... usage: nsradmin [-c] [-i file] [-f resfile] [-t typefile] ... [query]... http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S2 In oiuei to connect to the #)"+', seivice, we'll iun '3$&6!"' using both the "-s" option, anu the "-p" option. The piogiam numbei in this case is S9u11S (if wonueiing why, iun "'57$;0" T5 '),#-!#"!#.%/!" anu look foi S9u11S) - oi, a piogiam name of nsiexec. Note that when connecting to a client NetWoikei seivice, the "-s" option iefeis not to the NetWoikei seivei, but the seiveihost iunning the 3+$J"#+ you want to connect to. Foi the moment iestiicting ouiselves just to the NetWoikei seivei's client seivice, iun '3$&6!"' against the seivei anu uo a plain "piint" commanu: [root@tara ~]# nsradmin -s tara -p nsrexec NetWorker administration program. Use the "help" command for help, "visual" for full-screen mode. nsradmin> print type: NSRLA; name: tara.pmdg.lab; NW instance info operations: ; NW instance info file: ; installed products: ; version: EMC NetWorker 7.5.1.Build.413 12/11/09; servers: ; auth methods: "0.0.0.0/0,nsrauth/oldauth"; administrator: root, "user=root,host=tara.pmdg.lab"; kernel arch: x86_64; CPU type: x86_64; machine type: desktop; OS: Linux 2.6.18-128.2.1.el5; NetWorker version: 7.5.1.Build.413; client OS type: Linux; CPUs: 1; MB used: 12334; IP address: 192.168.50.7, "fe80::21c:42ff:fed3:b3df%eth0";
type: NSR peer information; administrator: root, "user=root,host=tara.pmdg.lab"; name: nimrod.pmdg.lab; peer hostname: nimrod.pmdg.lab; Change certificate: ; certificate file to load: ; This gives us seveial pieces of infoimation. (If you uo this against an active NetWoikei seivei, by the way, expect to see one "NSR peei infoimation" iesouice foi each NetWoikei client that has contacteucommunicateu with the NetWoikei seivei at least once.) http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page SS 0ne of the moie useful components iepoiteu is the "NSRLA" type. This pioviues us a chunk of useful infoimation about the client we'ie communicating with, incluuing, but not limiteu to: The authoiisation methous suppoiteu; The veision of NetWoikei installeu; The iecogniseu NetWoikei auministiatois (this list will not be pioviueu if the accessing usei uoesn't have authoiity to see that list); The aichitectuie anu opeiating system type; The amount of space useu acioss its filesystems ("NB useu"); The IP auuiesses. This in itself is useful infoimation that can be useu to check the status of clients. Bowevei, if we look at say, the "NSR log" component: nsradmin> print type: NSR log type: NSR log; administrator: root, "user=root,host=tara.pmdg.lab"; owner: NetWorker; maximum size MB: 2; maximum versions: 10; runtime rendered log: ; name: daemon.raw; log path: /nsr/logs/daemon.raw; (If you have installeu anu staiteu NetWoikei Nanagement Console, you'll have auuitional entiies heie.) 0ne of the moie inteiesting options heie is the "iuntime ienueieu log", which is an attiibute which allows you to tell NetWoikei wheie to put a stanuaiu "uaemon.log" file, in auuition to the 7.4.x style uaemon.iaw file. Thus, you coulu tell NetWoikei to geneiate the log by using the commanu: nsradmin> update runtime rendered log: /nsr/logs/daemon.log runtime rendered log: /nsr/logs/daemon.log; Update? y updated resource id 12.0.206.8.0.0.0.0.11.164.58.75.0.0.0.0.192.168.50.7(2) Note that foi a Winuows system, the path to the log shoulu be encloseu in uouble quotes, anu backslashes shoulu be escapeu, as pei noimal foi Winuows paths in '3$&6!"'. Foi fuithei examples of aujustments to the *BE )%@ iesouice, go to: F225+OO;9'=N$;0"OA6"%ODUUVOUPODWOA19$79MTM'(162$C(M'(;=('(=M6"%9M1;=M"2F('M6"%M"52$";9O Note that changes to the client seivices typically uon't take effect until you stop anu iestait NetWoikei. Anothei common aiea wheie you can use '3$&6!"' on the client seivices is to coiiect those pesky "NSR peei infoimation" eiiois. An aiticle coveiing this on the NetWoikei blog can be founu at: F225+OO;9'=N$;0"OA6"%ODUUVOUDODGOA19$79M0$X$;%M;9'M5(('M$;0"'C12$";M(''"'9O While you'ie moie likely to iun '3$&6!"' against the seivei seivices, knowing that you #&' iun it against client seivices (anu how to) is an impoitant tool in the aisenal of a NetWoikei Powei 0sei. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S4 N%T 6"&!M #0M-.,# 0I9#0""&(!" &! !"#,$*&! Peihaps moie so than any othei topic we've coveieu so fai, it's woith ieiteiating the impoitance of always ensuiing youi '3$&6!"' queiy woiks piopeily befoie iunning an action against it (e.g., upuate, appenu oi uelete). The ieason foi this is that if you'ie someone who uses iegulai expiessions fiequently, you may be suipiiseu by how anu when they can fail within '3$&6!"'. Teaching how iegulai expiessions woik is ceitainly beyonu the scope of this miciomanual, as entiie books aie ueuicateu to the intiicacies of this topic. Bowevei, to bastaiuise the uesciiption, let's say that iegulai expiessions (in NetWoikei pailance at least) aie about being able to use the piimaiy wilucaiu chaiactei, asteiisk (*) in queiies. (Beyonu this, youi expeiience with iegulai expiessions anu '3$&6!"' will be somewhat . pooi.) Let's stait with a basic example - we'u like to piint out all the clients that stait with "test" in theii names. Baseu on the 2'"R cieate-client.pl output fiom the pievious section, this might iun as follows: nsradmin> option regexp Regexp display option turned on
Display options: Dynamic: Off; Hidden: Off; Raw I18N: Off; Resource ID: Off; Regexp: On; nsradmin> show name:; backup command:; save set:; group: nsradmin> print type: NSR client; name: test* name: test11; group: Daily, Monthly; save set: All; backup command: ;
name: test13; group: Daily, Monthly; save set: All; backup command: ; You'll note that the fiist thing uone was to actually tuin on iegexp moue. If we haun't, oui session woulu have lookeu quite uiffeient: # nsradmin NetWorker administration program. Use the "help" command for help, "visual" for full-screen mode. nsradmin> show name:; backup command:; save set:; group: nsradmin> print type: NSR client; name: test* No resources found for query: name: test*; type: NSR client; In this case, without iegexp tuineu on, NetWoikei expecteu to liteially finu a client nameu "test*", iathei than any client whose name staiteu with "test". 0nfoitunately, ENC's implementation of iegexp suppoit within '3$&6!"' is extiemely limiteu at best. Let's look at a commanu wheie we want to ietiieve all clients whose name +'63 with 11. Baseu on the pievious iegexp enableu seaich, we know this shoulu succeeu. Bowevei: http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page SS nsradmin> option regexp Regexp display option turned on
Display options: Dynamic: Off; Hidden: Off; Raw I18N: Off; Resource ID: Off; Regexp: On; nsradmin> print type: NSR client; name: *11 No resources found for query: name: *11; type: NSR client; It is unfoitunate that ENC has implementeu such a limiteu veision of iegexp suppoit in '3$&6!"' - bettei enableu, this woulu even fuithei extenu the sciipting anu powei-usei options available within the utility. With this in minu, that pietty much iepiesents the extent to which iegulai expiessions can cuiiently be useu in '3$&6!"'. N%V W''.&!0 \($0 Foi the majoiity of this miciomanual, we've concentiateu on %')"'+ moue access in '3$&6!"', wheie we connect to a iunning NetWoikei seivei anu woik with its iunning configuiation. What we haven't coveieu is iunning '3$&6!"' in %II)"'+ moue. This is wheie, insteau of invoking it with just a plain: # nsradmin 0i, against a seivei: C:\> nsradmin s serverName We iun it against a uiiectoiy containing a iesouice configuiation uatabase. !:Y@+ E;=(' ;" 7$'7&C921;7(9 9F"&6= 8"& (.(' '&; ;9'1=C$; $; "006$;( C"=( 1%1$;92 1 '&;;$;% !(23"'4(' 9('.('Z9 7";0$%&'12$"; =121A19(N ?"$;% 9" 7"&6= 71&9( $''(51'1A6( =1C1%( ;(7(99$212$;% 1 A""292'15 '(7".('8. To look at offline moue, we'll shutuown oui NetWoikei seivices. 0n 0nixLinux, this can be uone with the commanu: # /etc/init.d/networker stop 0n Winuows, you can uo it fiom the seivices contiol snap-in, oi you can insteau just iun, at the commanu piompt: C:\> net stop nsrexecd /y 0nce this has been uone, we'll check out what it's like to iun '3$&6!"' against the NetWoikei configuiation uatabase in offline moue. 0n 0nixLinux, this might iesemble the following: # nsradmin -d /nsr/res/nsrdb NetWorker administration program. Use the "help" command for help, "visual" for full-screen mode. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S6 nsradmin> print type: NSR policy; name: Month type: NSR policy; comment: ; name: Month; number of periods: 1; period: Months; You can see theie that we've invokeu NetWoikei uiffeiently. We've tolu it to iun against a iesouice configuiation 6"$+#,%$<, locateu in "nsiiesnsiub". Noving acioss to Winuows, we can uo the same thing, with the iesult looking like the following:
#$%&'( W+ [&;;$;% ;9'1=C$; $; "006$;( C"=( That's all foi offline moue, anu foi one veiy ciitical ieason - many of the input valiuationsafety checks peifoimeu by the NetWoikei 3+$J+$ when you woik with '3$&6!"' uon't get uone when woiking in offline moue. Theiefoie, even as a powei-usei, you shoulu avoiu iunning '3$&6!"' in offline moue against a iesouice configuiation uatabase unless youi suppoit pioviuei has auviseu you to. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S7 P J990!$&I J Y K0"1 R01-9 L(!'&M-#,1&(! As outlineu in section "S Bow to uo the examples" (page 11), the examples in this miciomanual assume a testing configuiation establisheu on an otheiwise unuseu NetWoikei seivei. This Appenuix will take you thiough the steps iequiieu to establish this configuiation. P%B Z#(* /012(#30# \,!,M0*0!1 L(!"(.0 Fiom within the NetWoikei management console, cieate: 2 x Bisk backup uevices using an appiopiiate path. o Foi 0nixLinux, you might use: backup1 anu backup2 foi 0nixLinux; o Foi Winuows, you might use E:\NSR\u1 anu E:\NSR\u2 foi Winuows. These paths must alieauy exist, anu shoulu have at least SuB fiee. A gioup calleu Test. A pool calleu Test, with the Test gioup in it. A pool calleu Test Clone, as a clone pool. Nountlabel an ABv_FILE volume on the fiist uisk backup path in the Test pool. Nountlabel an ABv_FILE volume on the seconu uisk backup path in the Test Clone pool. Nouify the NetWoikei seivei client iesouice to have a single uiiectoiy as the save set, picking a uiiectoiy that is somewheie between 1 anu S uB. Also mouify the client to belong to the Test gioup. !"2(: Step-by-step instiuctions foi cieating these iesouices aie not supplieu foi a veiy specific puipose. This manual is taigeteu at NetWoikei Powei 0seis. If you neeu instiuction on setting up these iesouices within the NetWoikei Nanagement Console, some auuitional expeiience in NetWoikei woulu be stiongly iecommenueu befoie attempting this manual. P%@ Z#(* 6!&I]^&!-I L(**,!$ ^&!0 P%@%B [0"(-#+0 L(!'&M-#,1&(! R01-9 Assuming you have 1 0'(9F68 $;92166(= !(23"'4(' 9('.(' that has just been staiteu foi the fiist time: 1. Cieate a uiiectoiy calleu "backup1". 2. Cieate a uiiectoiy calleu "backup2" 4 . S. Cieate a text file calleu "bootstiap-tutoiials.nsii" with the content shown in the box below, ieplacing any instance of the woiu "'),#-!#"!#.%/!0!#!" with youi cuiient NetWoikei seivei's name. 4. Run the commanu (as ioot): '3$&6!"' [" P%%,3,$&D[,(,%$"&)38'3$" create type: NSR device; name: /backup1; media type: adv_file create type: NSR device; name: /backup2; media type: adv_file create type: NSR group; name: Test . type: NSR client; name: yourServerNameHere; save set: All update group: Test; save set: /usr/share create type: NSR pool; name: Test; groups: Test; pool type: Backup
4 Biiectoiies of "backup1" anu "backup2" assume (a) at least SuB fiee in the ioot filesystem &'6 (b) that you have auministiative piivileges on the host that you aie woiking fiom. If this is not the case, consult youi system auministiatoi foi access to a suitable location. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S8 create type: NSR pool; name: Test Clone; store index entries: no; pool type: Backup Clone
!"2(: It is iecommenueu to leave a blank line on the bottom of any '3$&6!"' sciipt file. This ensuies maximum compatibility acioss platfoims. The output fiom iunning the commanu shoulu appeai similai to the following: [root@tara ~]# nsradmin -i bootstrap-tutorials.nsri created resource id 113.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 114.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 115.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) Current query set updated resource id 74.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(2) created resource id 116.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) created resource id 117.0.152.62.0.0.0.0.154.188.55.75.0.0.0.0.192.168.50.7(1) Note that numbeis in the iesouice IBs aie likely to appeai uiffeiently on youi system. Bon't woiiy if those commanus uon't yet make sense to you - we'll woik on all those anu moie thioughout the miciomanual. P%@%@ C(.-*0 R01-9 We have cieateu two uisk backup units - backup1 anu backup2. Now we neeu to label them. We will cieate a volume calleu "Backup.uu1" in the "Test" pool on uisk backup unit backup1, anu a volume calleu "Clone.uu1" in the "Test Clone" pool on uisk backup unit backup2: [root@tara ~]# nsrmm -b Test -m -l -f /backup1 Backup.001 [root@tara ~]# nsrmm -b "Test Clone" -m -l -f /backup2 Clone.001 [root@tara ~]# nsrmm adv_file disk Clone.001 mounted on /backup2, write enabled adv_file disk Clone.001.RO mounted on /backup2/_AF_readonly, write protected adv_file disk Backup.001.RO mounted on /backup1/_AF_readonly, write protected adv_file disk Backup.001 mounted on /backup1, write enabled P%G Z#(* 2&!$(5" L(**,!$ ^&!0 P%G%B [0"(-#+0 L(!'&M-#,1&(! R01-9 Assuming you have a 0'(9F68 $;92166(= !(23"'4(' 9('.(' that has just been staiteu foi the fiist time: 1. Cieate a uiiectoiy calleu "X:\NSR" (wheie X is the path to an appiopiiate uiive) 2. Cieate a uiiectoiy calleu "X:\NSR\u1" (wheie X is the path to an appiopiiate uiive) S. Cieate a uiiectoiy calleu "X:\NSR\u2" (wheie X is the path to an appiopiiate uiive) S
4. Cieate a text file calleu "P%%,3,$&D[,(,%$"&)38'3$"", with the content shown in the box below, ieplacing any instance of the woiu "'),#-!#"!#.%/!0!#!" with youi cuiient NetWoikei seivei's name.
S The uiiectoiies specifieu shoulu have at least SuB fiee on the nominateu uiive, &'6 you have shoulu auministiative piivileges on the host that you aie woiking fiom. If this is not the case, consult youi system auministiatoi foi access to a suitable location. http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page S9 S. Run the commanu (as an account in the Auministiatoi gioup): '3$&6!"' T" P%%,3,$&D[ ,($%$"&)38'3$" create type: NSR device; name: "E:\\NSR\\01"; media type: adv_file create type: NSR device; name: "E:\\NSR\\02"; media type: adv_file create type: NSR group; name: Test . type: NSR client; name: yourServerNameHere; save set: All update group: Test; save set: "C:\\WINDOWS\\SYSTEM32" create type: NSR pool; name: Test; groups: Test; pool type: Backup create type: NSR pool; name: Test Clone; store index entries: no; pool type: Backup Clone
!"2(: It is iecommenueu to leave a blank line on the bottom of any '3$&6!"' sciipt file. This ensuies maximum compatibility acioss platfoims. 0ut of the box on Winuows, NetWoikei uoes not suppoit cieating uisk backup units uiiectly off the ioot uiiectoiy (\) of a uiive. Please ensuie to cieate the appiopiiate subuiiectoiy stiuctuie to ensuie youi commanus woik. Aujust paths foi uisk backup uevices anu the uiiectoiy to be backeu up appiopiiately, but iemembei to always keep Winuows paths in uouble quotes, anu whenevei a single backslash (\) woulu be useu in Winuows, use two (\\) foi '3$&6!"'. The output fiom iunning this commanu shoulu appeai similai to the following:
#$%&'( V+ \""292'155$;% 2F( !(23"'4(' 7";0$%&'12$"; '(]&$'(= 0"' 2F( C$7'"C1;&16 "; 3$;="/9 P%G%@ C(.-*0 R01-9 We have cieateu two uisk backup units. In the example given, these weie cieateu at "E:\NSR\u1" anu "E:\NSR\u2". Now, we neeu to label them. We will cieate a volume calleu Backup.uu1 in the "Test" pool on uisk backup unit "E:\NSR\u1", anu a volume calleu "Clone.uu1" in the "Test Clone" pool on uisk backup unit "E:\NSR\u2". Please aujust youi paths accoiuingly if youi uevices weie cieateu on alteinate paths: http:nsiu.infomiciomanuals Pieston ue uuise Pieston ue uuise Page 6u
#$%&'( *U+ ^1A(66$;% C(=$1 $; 2F( _?KQ#<^@ =(.$7(9 "; 3$;="/9 You'll see in the above output, by the way, that it was not necessaiy to "escape" the backslashes (i.e., use \\ insteau of \) in the '3$!! commanus.