NetWorker: How to use the nsrclone command with filters
Summary: NetWorker 19.1 has introduced new options to the nsrclone command that allow for the use of filters similar to those used with mminfo. This article explains how to use this.
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
The '
nsrclone' command can be used on the NetWorker server to manually clone save sets based on user-defined criteria or identifiers. Use the 'mminfo' command to determine which identifiers to use to define a list of save sets to clone. Identifiers include the client name, the save set name, the backup level, and the number of valid copies or clones not yet created in the target pool.
It is possible to clone specific save sets that are a part of policy, workflow, or action by using filters with the
nsrclone command as described below:
- Use the
mminfocommand to define exactly which criteria to use.mminfo -q "policy=[policy name]" -q "workflow=[workflow name]" -q "savetime>[unit of time]" -r [list of columns to include in results]- For example:
mminfo -q "policy=Mona" -q "workflow=Felix_wf" -q "savetime>4 days ago" -r "ssid,cloneid,client,name(10),savetime,level,volume,pool,copies" ssid clone id client name date lvl volume pool copies 1844199883 1558987268 nw231 /felix 05/27/2019 full SanLorenzoDDPool.005 SanLorenzoDDPool 1 418395723 1559246469 nw231 /felix 05/30/2019 full SanLorenzoDDPool.005 SanLorenzoDDPool 1 183563875 1559295644 nw231 /felix 05/31/2019 full SanLorenzoDDPool.005 SanLorenzoDDPool 1
- For example:
- Test the equivalent
nsrclonecommand with filters using the '-n' switch for 'Do not execute'. This option causesnsrcloneto generate and print the list of save sets to be cloned without performing the operation.nsrclone -n -S -s [NW server name] -e [latest save set time] -t [earliest save set time] -q policy=[policy name] -q worfklow=[workflow name] -b [destination pool] > [outputfile.txt] 2>&1- Nothing is cloned, but the output file allows the user to judge whether the selected criteria pulled the expected save sets.
- Filters at the same level are joined by a logical
OR. If two policies were selected, the save sets from both policies are listed. - Filters at different levels are joined by a logical
AND. If one policy and one workflow are selected, only save sets that match both the policy and the workflow are listed. - For example:
nsrclone -n -S -s nwserver121 -e "now" -t "4 days ago" -q policy="Mona" -q workflow="Felix_wf" -b SanLorenzoDDCLone > felixclone.txt 2>&1 - The above command tells the system to clone all save sets that:
- Have a '
savetime' value between four days ago and now - Are part of both the policy
Monaand the workflowFelix_wf(logicalAND)
- Have a '
- Run the
nsrclonecommand and confirm that it has worked as expected.nsrclone -S -s [NW server name] -e [latest save set time] -t [earliest save set time] -q policy=[policy name] -q worfklow=[workflow name] -b [destination pool]- For example:
nsrclone -S -s nwserver121 -e "now" -t "4 days ago" -q policy="Mona" -q workflow="Felix_wf" -b SanLorenzoDDClone - Confirm success by running the same
mminfocommand as before. There is now a save set in the clone pool for each save set in the backup pool.mminfo -q "policy=[policy name]" -q "workflow=[workflow name]" -q "savetime>[unit of time]" -r [list of columns to include in results] - For example:
mminfo -q "policy=Mona" -q "workflow=Felix_wf" -q "savetime>4 days ago" -r "ssid,cloneid,client,name(10),savetime,level,volume,pool,copies" ssid clone id client name date lvl volume pool copies 1844199883 1559300768 nw231 /felix 05/27/2019 full nwserver121.009 SanLorenzoDDClone 2 418395723 1559300768 nw231 /felix 05/30/2019 full nwserver121.009 SanLorenzoDDClone 2 183563875 1559300768 nw231 /felix 05/31/2019 full nwserver121.009 SanLorenzoDDClone 2 1844199883 1558987268 nw231 /felix 05/27/2019 full SanLorenzoDDPool.005 SanLorenzoDDPool 2 418395723 1559246469 nw231 /felix 05/30/2019 full SanLorenzoDDPool.005 SanLorenzoDDPool 2 183563875 1559295644 nw231 /felix 05/31/2019 full SanLorenzoDDPool.005 SanLorenzoDDPool 2
- For example:
Additional Information
Further Examples:
- Clone all save sets:
- With a
savetimeof 1 month ago or more recent - From the group named '
DPG' - That meet all three criteria: "
action=backup" AND "policy=Gold" AND "workflow=NMC server backup": -
nsrclone -q "group=DPG" -q "action=backup" -q "policy=Gold" -q "workflow=NMC server backup" -S -t "1 month ago"
- With a
- Clone all save sets that were backed up as part of the policy '
P1' OR the policy 'P2':-
nsrclone -q "policy=P1" -q "policy=P2"
-
- Clone all save sets:
- Whose
savetimeis between two specific dates AND - That were backed up as part of the policy '
Zinka' OR the policy 'Mona': -
nsrclone -S -t "04/15/2019" -e "05/01/2019" -q policy=Zinka -q policy=Mona
- Whose
- Copy all save sets:
- Created between
01/21/05 14:50:03and01/24/05 14:50:03AND - For the policy '
P1' OR the policy 'P2': -
nsrclone -S -t '01/21/05 14:50:03' -e '01/24/05 14:50:03' -q policy=P1,policy=P2
- Created between
- Clone all save sets:
- Created between time
01/21/05 14:50:03and01/24/05 14:50:03AND - For the workflow '
W1' of policy 'P1' -
nsrclone -S -t '01/21/05 14:50:03' -e '01/24/05 14:50:03' -q policy=P1,workflow=W1
- Created between time
Affected Products
NetWorkerProducts
NetWorkerArticle Properties
Article Number: 000013633
Article Type: How To
Last Modified: 30 رمضان 1447
Version: 4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.