Adding more than one client at a time from Solaris

1 view
Skip to first unread message

Poindexter

unread,
Jun 28, 2007, 9:07:16 AM6/28/07
to Legato NetWorker
Adding each client entry one at a time is quite a pain, expecially if
you're adding 100+ new systems. Is there a Solaris command line that
would enter a list of computers if they all have the same criteria
(eg, schedule, policies, group, etc?)

any help would be appreciated.

michael guldan

unread,
Jul 2, 2007, 4:05:31 PM7/2/07
to Legato-N...@googlegroups.com
Here's a quickie script to add clients via nsradm:

#!/usr/bin/perl

#
#  Takes filename as argument. 
#  file should contain clientnames one to a line non qualified

# todo:
# do initial probe after adding client
# prompt for client resourcevalues
#
#
# good practice
use Strict;
use File::Path;
use warnings;



$NW_SERVER="nwserver.example.com";
$BROWSE="daily";
$RETENTION="daily";
$GROUP="test";
$SAVESET="All";
$COMMENT="Filesytem Daily";
open (HOSTS, "$1");

@hosts = <HOSTS>;

foreach $host (@hosts) {
    $name  = split ('.',$host);
   
    #open( NSRADM, "|nsradmin -s $NW_ADMIN ");
    print "create type:NSR client;\n";
    print "name: $name;\n";
    print "server: $NW_SERVER;\n";
    print "comment: $COMMENT;\n";
    print "archive services: Disabled;\n";
    print "browse policy: $BROWSE;\n";
    print "retention policy: $RETENTION;\n";
    print "group: $GROUP;\n";
    print "save set: $SAVESET;\n";
    print "aliases: $name $name.example.com;\n";
    print "y\n\n";
    #close (NSRADM);
Reply all
Reply to author
Forward
0 new messages