CRAZYROV STUDIO

NetWorker nsrTools - Part 2

Published on 7 Aug, 2020



nsrTools is an interactive command-line utility created by the DELL EMC Field support which bundles different support tools to have one tool in one place. The tool can be downloaded from the EMC FTP link - ftp://nwc:nwc@ftp.emc.com/nsrTools/nsrTools.zip

Compatibility :

This tool supports NetWorker version 18 and newer releases.
Operating systems:
  • Windows 2012 64bit or newer
  • Linuxt 64bit distributions:
    • CentOS / RHEL 6.x, 7.x, 8.x
    • SUSE SLES 11.x, 12.x or newer

There is no installation required and nsr tools is read-only so no configuration change will be done to your system so this is pretty safe to tinker around with.

There are a lot of tools packed into this one package and covering all of it in one article is going to make it a lot lengthier than I want. Thus this is going to be a multipart article. n this part of the video we will logging we will look at

  • NMC Password Reset
  • NMC Password Change
  • Show Expired records
  • Duplicated NSR Clients
  • Duplicated NSR Volumes

Lets go ahead and launch the nsrTools. nsrTools, on launch you will be greeted with the information about your current NetWorker server.

NMC Password Reset

Another feature in nsrtools that come in very handy is the option to reset the administrator password of the NetWorker authc service which inturn would be the user that we would use to login into the NMC. There is a process that is described in a DELL EMC Support KB but that has multiple steps when compared to the option single commands in nsrtools. The process however is not different over all, the main one being the restart of NetWorker services which you are asked to do before using the new password. To use this run the command nmc password reset on the nsrtools. You can confirm that the password has changed by running the nsrlogin command or using the authc_mgmt command

nmc password reset
[nsrTools CLI]» nmc password reset
2020/08/07 11:32:56 DBG:  The task selection received an argument: 'nmc password reset'. Processing with it ...
2020/08/07 11:32:56 === Starting NMC Password Reset Engine for NetWorker server nsr-server.crazyrov.com ===
2020/08/07 11:32:56 INFO: The administrator password should have at least 1 upper case characters, 1 number and 1 special character. We suggest to have lentht <= 9 charactes.
QUESTION: Please provide new NMC password for Administrator account?	
QUESTION: Please re-type and confirm same password once again?	
2020/08/07 11:33:06 INFO: New NMC:Administrator password successfully matched. Continue.
2020/08/07 11:33:06 INFO: Replacing the encoded password to the file. Done.
2020/08/07 11:33:06 INFO: Creating new NetWorker NMC authc-local-config.json file.
2020/08/07 11:33:06 INFO: The new NMC /nsr/authc/conf/authc-local-config.json file successfully created.
2020/08/07 11:33:06 INFO: Kindly re-start NetWorker services once you are ready and try logging in to NMC with the new password!
2020/08/07 11:33:06 INFO: For SLES/RHEL 7.X+ type:  nsr_shutdown; service gst stop; service networker start; service gstd start
2020/08/07 11:33:06 INFO: For older systems  type:  nsr_shutdown; service gst stop; service networker start; service gstd start
2020/08/07 11:33:06 ===========================================================================================================================================
2020/08/07 11:33:06 Use the 'authc_mgmt' command to confirm that you can connect to the NetWorker Authentication Service with the new password.
2020/08/07 11:33:06 For example:
2020/08/07 11:33:06   # authc_mgmt -u administrator -p  -e find-all-users
2020/08/07 11:33:06 HINT: In a case of problems check NetWorker auth.log: Linux: /nsr/authc/logs/authc-server.log;  Windows: ...nsr\authc\logs\authc-server.log

2020/08/07 11:33:06 ===========================================================================================================================================
2020/08/07 11:33:06 INFO: We are done with NMC Password Reset Engine section. Going back to Main Meny ...

NMC Password Change

To use this feature you can type in the command nmc password change into the nsrtools prompt.I really can't call this a feature but it is mentioned as a feature in the documentation, I would refer to this as more of a knowledge base as it just provides you with the command and steps to reset the password but does not change the command for you. Either way I guess it is easier to get this information from nsrtools than logging into the support portal and searching for the KB there.

mmdb to sqlite
[nsrTools CLI]» nmc password change
2020/08/07 11:37:51 === Starting NMC Password Change Engine for NetWorker server nsr-server.crazyrov.com ===
2020/08/07 11:37:51 Please follow up below instructions to change password for Administrator Account or any local user.

General Info
============
By default, the NetWorker Authentication Service password policy enforces password expiration for local user accounts.
A NetWorker Authentication Service administrator can change the password for any local user. 
A non-administrator user can only change their own password.

Use the authc_mgmt tool to change the password for a local database user. 
The command to change the password differs, depending on the user that changes the password.


Changing Password for Administrator User:
=========================================
To change the password for the administrator account, or for a non-administrator user to change their password, use the -e update-password option:
  # authc_mgmt -u username -p "current_password" -e update-password -D password-new-value="new_password"

where:
  "username" is the name of the user whose password you want to change, or local administrator account.
  "current_password" is the current password for the username that you specified.
  "new_password" is the new password for the username that you specified.

Example: To change the password for the local administrator account, type the following command:
  # authc_mgmt -u administrator -p "1.Password" -e update-password -D password-new-value="1.Updated2"

Note: To change the password without typing the new password in the command string, do not include the -D password-new-value="new_password" option. 
The command will prompt you for the new password and will not display the characters.


Changing Password for non-administrator User:
=============================================
To use the administrator account to change the password for any user, use the -eupdate-user option with the -D user-name and -D user-password options:
  # authc_mgmt -u administrator -p "current_password" -e update-user -D user-name=username -D user password="new_password"

where:
  "current_password" is the password for the administrator account.
  "username" is the name of the user whose password you want to change.
  "new_password" is the new password that you want to set for the user.

Example: To change the password for a local user who is named AdminRej to "RejLikeToCode1.", type the following command:
  # authc_mgmt -u administrator -p "1.Password" -e update-user -D username=AdminRej -D user-password="RejLikeToCode1."


2020/08/07 11:37:51 INFO: We are done with NMC Password Change Engine section. Going back to Main Meny ...

Show expired records

To use this feature run the command mmdb expired ssid on the nsrtools prompt. This feature of nsrtools provides you with a list of savesets that have expired and currently in the media database of the NetWorker server. A separate csv file will be created for the savesets that have expired over time.

mmdb expired ssid
nsrTools CLI]» mmdb expired ssid
2020/08/07 12:20:36 === Starting Eligiable for Recycling SSID Engine ===
2020/08/07 12:20:36 INFO: Spawning child process to get requested information from NetWorker MMDB. It can take some seconds ...
2020/08/07 12:20:36 DEBUG: Required mminfo output:
		    ==> mminfo -avIot -s nsr-server.crazyrov.com -q type=Data Domain,type=adv_file -r ssid,savetime(24),ssretent(24),ssflags,sumflags,cloneid,clretent(24),clflags,totalsize,volume,type,level,copies -xm
2020/08/07 12:20:37 INFO: Successfully opened mminfo file: '/home/rovin/tmp/mminfoSSID.dat'. Processing ...
2020/08/07 12:20:37 INFO: Trying to unmarshal XML file:/home/rovin/tmp/mminfoSSID.dat
2020/08/07 12:20:37 INFO: Finished with Media DB analyze. Here are the numbers and brief summary.
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Statistical overview of Expired List starting from today '08/07/2020'                                                    ┃
┣━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃   ┃ SUBJECT NAME (AGE)                          ┃ # EXPIRED SSID ┃ CAPACITY (BYTE) ┃ CSV FILE NAME AND PATH              ┃
┣━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ 1 ┃ AFTD Expired found                          ┃   0            ┃ 0               ┃ N/A                                 ┃
┃ 2 ┃ Data Domain Expired found                   ┃   0            ┃ 0               ┃ N/A                                 ┃
┃ 3 ┃ # of expired in time between   0 -  30 days ┃   0            ┃ 0               ┃ /home/rovin/tmp/0Days-30Days.csv    ┃
┃ 4 ┃ # of expired in time between  30 -  90 days ┃   0            ┃ 0               ┃ /home/rovin/tmp/30Days-90Days.csv   ┃
┃ 5 ┃ # of expired in time between  90 - 180 days ┃   0            ┃ 0               ┃ /home/rovin/tmp/90Days-180Days.csv  ┃
┃ 6 ┃ # of expired in time between 180 - 360 days ┃   0            ┃ 0               ┃ /home/rovin/tmp/180Days-360Days.csv ┃
┃ 7 ┃ # of expired in time over 360 days          ┃   0            ┃ 0               ┃ /home/rovin/tmp/360Days_over.csv    ┃
┗━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
 


2020/08/07 12:20:37 INFO: Flushing Expired data [ssid,savetime(24),ssretent(24),ssflags,sumflags,cloneid,clretent(24),clflags,totalsize,volume,type,level,copies] to separated CSV files ...
2020/08/07 12:20:37 INFO: Flushing Expired data DONE. We are done here, going back to main meny.
2020/08/07 12:20:37 INFO: Done with Eligiable for Recycling SSID Engine for nsr-server.crazyrov.com. Going back to main meny.

Duplicated NSR Clients

To use this feature run the command mmdb duplicate clients on the nsrtools prompt. This feature helps us identify if there are any client instances on your NetWorker server that have duplicate client id. This scenario occurs 2 different client instances in NetWorker are assigned the same clientid. One of the indications that you have duplicate clientid is that the index gets purged as soon as the nsrim runs even though the savesets are in a browseable state.

mmdb duplicate clients
[nsrTools CLI]» mmdb duplicated clients
2020/05/02 21:49:43 === Starting to analyze duplicated Client records Engine for NWS: myHostLinux001.abcd.lan ===
2020/05/02 21:50:37 DEBUG: Required mminfo output:
                    ==> mminfo -av -s myHostLinux001.abcd.lan -r clientid,client -xc|
2020/05/02 21:50:38 INFO: The mminfo file /root/nsrTools/tmp/mminfoClients.dat successfuly created.
2020/05/02 21:49:43 INFO: The duplicated Client Engine finished. There is just 1 duplicated Client record. Here the list:
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Duplicated NSR Clients Information list                                                                       ┃
┣━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃   ┃ CLIENT ID                                             ┃ FIRST CLIENT NAME       ┃ SECOND CLIENT NAME      ┃
┣━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ 1 ┃ db8ac0f5-00000004-5e936e65-5e936e64-00010c00-4ca5e029 ┃ myHostLinux001.abcd.lan ┃ myHostLinux011.abcd.lan ┃
┗━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━┛
INFO: Please check environment for those NW Client records.

Duplicated NSR Volumes

The last one in this part of the video for nsrtools is Duplicated NSR Volumes. To use this feature run the command mmdb duplicated volumes in the nsrtools prompt. This feature helps you check if there are any duplicated NetWorker’s media database entries for Volumes and Volume ID. Even though a very rare occurrence, this might be a possibility and this feature helps you check if this issue exists in your NetWorker media database or not.

mmdb duplicated volumes
[nsrTools CLI]» mmdb duplicated volumes
2020/05/02 22:27:05 === Starting to analyze duplicated Volume records Engine for NWS: myHostLinux001.abcd.lan ===
2020/05/02 22:38:07 DEBUG: Required mminfo output:
                    ==> mminfo -av -s myHostLinux001.abcd.lan -r volid(64),volume -xc|
2020/05/02 22:38:07 INFO: Starting mminfo child process to get information from NetWorker MMDB. The process can take some time ...
2020/05/02 22:38:07 INFO: The mminfo file /root/nsrTools/tmp/mminfoVolumes.dat successfuly created.
2020/05/02 22:27:05 INFO: The duplicated Volume Engine finished. There is just 1 duplicated Volume record. Here the list:
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Duplicated NSR Volume Information list                                                             ┃
┣━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┫
┃   ┃ VOLUME ID                                             ┃ FIRST VOLUME NAME ┃ SECOND VOLUME NAME ┃
┣━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━┫
┃ 1 ┃ 8df834b9-00000005-f893756d-5e93756d-000a0c00-4ca5e029 ┃ foobarpool.002    ┃ foobarpool.001     ┃
┗━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━┛
INFO: Please check environment for those NW Volume records.

Thank you for visting www.crazyrov.com, you can also check out my YouTube channel - crazyRov Studios for Data protection and cloud related technical videos.

CRAZYROVSTUDIO