Unsolved
This post is more than 5 years old
2 Intern
•
1.1K Posts
0
1501
June 19th, 2009 07:00
Rename client script
One thing I have been tasked with is to have a consistent naming of clients across all backup zones, ie those clients that have been entered as a client by the short name will be deleted and readded as their FQDN as long as they check out successfully with DNS now (with hosts files being largely phased out). Since there are several hundred clients I will do this by script so here is what I am planning to do:
nsradmin query to extract the following fields and write to a temp file:
type;name;client id;comment;scheduled backup;schedule;browse policy;retention policy;directive;group;save set;remote access;remote user;password;backu
p command;Save operations;aliases;parallelism;application information;ndmp;storage nodes;clone storage nodes;recover storage nodes
Split temp file up into individual temp files for each client entry.
For each file extract name and determine if short or long name - if long name do nothing further, if short name:
extract FQDN from aliases field
run DNS lookups against short and FQDN; run reverse lookup
If problem update comment field to indicate DNS issues and do nothing further with this client
Delete client entry using nsradmin and client temp file
Amend client temp file changing short name to FQDN; amend comment field
Use client temp file to create new entry; apply twice due to using same client ID
Can anyone see anything missing here; particularly with checking other client types for that client, pools etc?
nsradmin query to extract the following fields and write to a temp file:
type;name;client id;comment;scheduled backup;schedule;browse policy;retention policy;directive;group;save set;remote access;remote user;password;backu
p command;Save operations;aliases;parallelism;application information;ndmp;storage nodes;clone storage nodes;recover storage nodes
Split temp file up into individual temp files for each client entry.
For each file extract name and determine if short or long name - if long name do nothing further, if short name:
extract FQDN from aliases field
run DNS lookups against short and FQDN; run reverse lookup
If problem update comment field to indicate DNS issues and do nothing further with this client
Delete client entry using nsradmin and client temp file
Amend client temp file changing short name to FQDN; amend comment field
Use client temp file to create new entry; apply twice due to using same client ID
Can anyone see anything missing here; particularly with checking other client types for that client, pools etc?
0 events found
No Events found!


DavidHampson
2 Intern
•
1.1K Posts
0
June 19th, 2009 08:00
website
5 Posts
0
June 20th, 2009 21:00
It's not suggested.
DavidHampson
2 Intern
•
1.1K Posts
0
June 22nd, 2009 01:00
ble1
6 Operator
•
14.4K Posts
•
56.2K Points
1
June 22nd, 2009 06:00
aismaili
25 Posts
0
June 22nd, 2009 08:00
DavidHampson
2 Intern
•
1.1K Posts
0
June 25th, 2009 02:00
DavidHampson
2 Intern
•
1.1K Posts
0
July 1st, 2009 07:00
You were correct. There is just one thing I think it will be useful to add here, that the index needs renaming to what the new client name will be prior to it being recreated otherwise it creates a new client index.
If you can reply to this I can give you your green star as I have already marked your response as helpful!
ble1
6 Operator
•
14.4K Posts
•
56.2K Points
0
July 11th, 2009 02:00
dugans1
2 Intern
•
186 Posts
0
July 13th, 2009 01:00
if you export the client id and the short name and create the new client with the old client id and the short name in the alias colum, i think that might waork and you would not need to touch the Media DB. If i'm wrong please post so i know.
DavidHampson
2 Intern
•
1.1K Posts
0
July 13th, 2009 03:00