[Networker] Adding Networker Clients in Bulk using client info exported
2013-08-14 13:49:32
Don't know if you are a perl person......
But, one method is to create a bunch of create commands from your exported
output list from nsradmin. each client create command should look like this:
create name: client1; scheduled backup: Enabled; comment: OSFullThur;
schedule: Full Every Thursday; browse policy: 37Days; retention policy: 37Days;
directive: Unix without dbf - Solaris 10; group: ISFarm_OS; save set: All;
backup command: ; server network interface: ; aliases: client1,
client1.xxxdev.com ; parallelism: 4; type: NSR client;
Once you have the list of create commands, they need to get fed into an
nsradmin -i command.
Here's a perl program that creates the necessary input to an nsradmin -i
command to create clients.
The output this creates will displayed on the screen.... you'll have to capture
that output via a pipe or some other method (like updating the program to write
to a file) so it can be used as input to the nsradmin -i command.
Also, the first line: @nsrclients creates my equivalent to your exported list.
You can change it read your already existing list like this:
@nsrclients=`cat yourlist_location`;
Don't know if any of this helps you..... It's the method I used recently to
re-create a bunch of clients on a new server.....
#!/usr/bin/perl
#
# script to create an input file to be used to create Networker clients via
the command line
# via the nsradmin -i command
#
# first step is to create the list of fields you want to create the new clients
from
@nsrclients=`nsradmin -i /export/home/japgar/nsradmin_list_create_clients.txt`;
chomp @nsrclients;
$jstr="";
$first=1;
foreach (@nsrclients)
{
$_ =~ s/^\s+//; # strip out leading whitspaces
$_ =~ s/\s+$//; # strip out trailing whitspaces
if( $_ =~ /name:/)
{
if($first eq 1)
{
$first=0;
$jstr="$jstr $_";
next;
}
print "create $jstr type: NSR client; \n\n";
$jstr="";
}
$jstr="$jstr $_";
}
print "create $jstr type: NSR client; \n\n";
+----------------------------------------------------------------------
|This was sent by jim.apgar13 AT gmail DOT com via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------
|
|
|