nsrclone(8)                                                                 nsrclone(8)

NAME

       nsrclone - NetWorker save set cloning command


SYNOPSIS

       nsrclone [ -v ] [ -n ] [ -F ] [ -s server ] [ -J recover storage node ]
               [ -d save storage node ] [ -b pool ] [ -y retention ] [ -w
                browse ] [ -R ] [ -m ] { -f file | volname...  }

      nsrclone [ -v ] [ -n ] [ -F ] [ -s server ] [ -J recover storage node ]
               [ -d save storage node ] [ -b pool ] [ -y retention ] [ -w
                browse ] [ -R ] [ -m ] -S { -f file | ssid...  }

      nsrclone [ -v ] [ -n ] [ -F ] [ -s server ] [ -J storage node ] [ -d
               save storage node ] [ -b pool ] [ -C less than copies in pool
                ] [ -y retention ] [ -w browse ] [ -m ] -S -t start time [ -e
                end time ] [ -B pool name ]... [ -N saveset name ]... [ -l
                level or range ]... [ -c client name ]... [ -g group name ]...

      nsrclone [ -v ] [ -n ] [ -F ] [ -s server ] [ -J recover storage node ]
               [ -d save storage node ] [ -b pool ] [ -C less than copies in
                pool ] [ -y retention ] [ -w browse ] [ -m ] -S -e end time [
                -t start time ] [ -B pool name ]... [ -N saveset name ]... [
                -l level or range ]... [ -c client name ]... [ -g group name
                ]...

      nsrclone [ -v ] [ -n ] [ -F ] [ -s server ] [ -J recover storage node ]
               [ -d save storage node ] [ -b pool ] [ -y retention ] [ -w
                browse ] [ -R ] [ -m ] -V { -f file | volid...  }

      nsrclone [ -v ] [ -s server ] [ -J storage-node ] [ -y retention ] -P
                -W volname



DESCRIPTION

       The  nsrclone  program  makes  new  copies of existing save sets. These
       copies are indistinguishable from the original,  except  for  the  vol-
       ume(s)  storing  the  copies.  The copies are placed on different media
       volumes, allowing for higher reliability than a single  copy  provides.
       The  copies  may be made onto any kind of media (for example, save sets
       on an 8mm tape may be copied to a set of optical disks).  However,  all
       media  used  as  the  destination of an nsrclone operation must be in a
       clone pool.  See nsr_pool(8) for a  description  of  the  various  pool
       types.

       Although  the command line parameters allow you to specify volume names
       or volume identifiers, nsrclone always copies complete save sets.  Save
       sets  that  begin  on  a specified volume will be completely copied, so
       volumes may be requested during the cloning operation  in  addition  to
       those specified on the command line.  Conversely, save sets residing on
       the specified volumes that begin elsewhere are not cloned.

       Note that nsrclone does not  perform  simple  volume  duplication,  but
       rather,  copies  full  save  sets  to a set of destination volumes in a
       given pool.  If the first destination volume chosen cannot hold all  of
       the save sets to be copied, another volume will be chosen.  This allows
       you to use different kinds of media for each copy, allowing  for  vari-
       able sized volumes, such as tapes.

       The nsrclone program, in conjunction with  nsrmmd(8),  guarantees  that
       each  save set will have at most one clone on a given volume.  When you
       specify a volume name or identifier, the copy of the save sets on  that
       volume  are  used  as the source.  When save sets are specified explic-
       itly, those with existing  multiple  copies  are	 automatically	chosen
       (copies of save sets that exist on volumes in a jukebox are chosen over
       those that require operator intervention).  You can also specify	 which
       copy  (clone) of a save set to use as the source, (see the -S option,in
       the options section).

       Cloning between storage nodes is accomplished by an  nsrmmd(8)  on  the
       source  node reading from a volume, and another nsrmmd(8) on the target
       node writing to a volume.  The source node is determined by  the	 loca-
       tion  of	 a  source  volume,  which  is	given  by  where the volume is
       currently mounted or by its "location" field if	unmounted  (see	 mmlo-
       cate(8)).   The	target	storage	 node  of a clone is determined by the
       "clone storage nodes" attribute of the  source  storage	node's	client
       resource,  the  "clone storage nodes", or the "storage nodes" attribute
       of the server's client resource in descending  priority.	  Please  note
       that  nsrclone  never  looks  at the clone storage node affinity of the
       clients whose savesets are being cloned.	 See  nsr_storage_node(5)  and
       nsr_client(5)  for  additional  detail on how these attributes are used
       and on other storage node information.

       The -c, -N, -l & -g criteria  options  select  candidate	 savesets  for
       cloning	and  are  intended to behave like the equivalent mechanisms in
       mminfo(8).

       The nsrclone program can also be used to clone NDMP (Network Data  Man-
       agement  Protocol)  save sets.  If the save set to be cloned was backed
       up by nsrndmp_save via nsrdsa_save (Data Server Agent program where the
       save  set's flags have 'N' and 's'), then the save set can be cloned to
       any NetWorker storage device other  than  an  NDMP  tape  device.   See
       mminfo(8) for more details on the 'N' and 's' save set flags.  Refer to
       nsrndmp_save(8) for more information regarding  NDMP  backup.   Non-DSA
       NDMP save sets can only be cloned to NDMP tape devices.  Cloning from a
       non-NDMP tape device to an NDMP tape device,  and  vice-versa,  is  not
       supported.

       When  -m  option  is specified, nsrclone program is used to migrate (or
       stage) existing save sets on a manual basis.  Migration is the  process
       of  moving  one or more save sets between storage volumes.  The process
       begins by making a clone of the specific save sets to  the  new  volume
       specified, and then deleting the cloned save set entries from the media
       database (see the -S description).  Finally,  the  save  sets  will  be
       removed  from  the  original  source volumes.  The second and the third
       operations are triggered by the successful completion of  the  previous
       operation.  The data is moved to new media volumes, making room for new
       data on the original volumes.

       Migration can be onto any media type (for example: save sets on a  disk
       family  volume can be migrated to a tape or disk volume).  The nsrclone
       program supports save set and volume migration from  disk  family  vol-
       umes.

       For  migration  operation,  if the nsrclone program encounters an error
       after successfully cloning some of the specified  save  sets,  then  it
       will  delete  only  those  successful  save sets from the source volume
       before it gets aborted.  Concurrent migration operation from RW and  RO
       volumes of Data Domain and adv_file are not supported.

OPTIONS

       -b pool
              Specifies  the media pool to which the destination clones should
              be sent.  The pool may be any  pool  currently  registered  with
              nsrd(8)  that  has its status set to clone.  The possible values
              can be viewed in NetWorker Management Console by clicking Media
              from the Administrator window, then selecting Media  Pools  from
              the  left	 pane.	 If you omit this option, the cloned save sets
              are automatically sent to the Default Clone pool.

       -B pool name
              If  a  pool  name  is specified, only the save sets belonging to
              that pool will be selected.  More than  one  pool  name  can  be
              specified  by using multiple -B options. This option can only be
              used with the -t or -e options.
              
       -C less than copies in pool
	      Specifies the upper non-inclusive integer bound such  that  only
	      savsets with a lesser number of clone copies in the target clone
	      pool will be considered for cloning.  Note that since the target
	      is  a  clone pool, each saveset's original copy is never consid-
	      ered when tallying the saveset's number  of  copies.   Likewise,
	      any  AFTD	 read-only  mirror  clone  is  not  considered, as its
	      read/write master clone will be already  counted	and  there  is
	      only  one	 physical  clone  copy between the related clone pair.
	      This option can only be used with the -t or -e option.

       -f file
              Instructs nsrclone to read the volume names, volume  identifiers
              or  save  set  identifiers  from  the file specified, instead of
              listing them on the command line.  The values must be listed one
              per  line in the input file. This option cannot be specified
	      with -t and -e options.   The file may be "-", in which case
              the values are read from standard input.  The cloning  operation
              begins only when all the entries in the file are correctly spec-
              ified; even if one of the entries is invalid, the operation will
              not continue and the corresponding error is reported.

       -R     Removes the input file that specifies the volume names, save set
              or  volume identifiers to be cloned/staged. This option can only
              be specified with a -f option.
              
       -F     If  specified  will  force  nsrclone   to	  skip	 all   invalid
	      savesets/volumes and continue cloning.

       -s server
	      Specifies	 a  NetWorker  server  to migrate save sets from.  See
	      nsr(8) for a description of server selection.   The  default  is
	      the current system.

       -J recover storage-node
              Specifies which host to use as the storage node for the recovery
              part of the cloning  process  (see   nsr_storage_node(5)).   The
              host  specified  must  be included in "recover storage nodes" or
              "storage nodes" attribute  of  server's  client  resource.   See
              nsr_client(5) for more information.

       -d save storage node
              Specifies  which  host  to  use as the storage node for the save
              part of the cloning process (see  nsr_storage_node(5)).
              
       -v     Enable verbose operation.	 In this mode, additional messages are
	      displayed	 about	the  operation	of nsrclone, such as save sets
	      that cross volumes, names of cloned volumes, or save set	series
	      expansions.   If concurrent nsrclone operations are performed on
	      the same save sets, it is possible for the volume	 names	to  be
	      inaccurate.  In  that case nsrclone will issue a warning. Please
	      see DIAGNOSTICS for the exact warning message.

       -y retention
	      Sets the date (in nsr_getdate(3) format) when  the  cloned  data
	      will  become  recyclable.	  The special value forever is used to
	      indicate that a volume that never expires (i.e. an archive  vol-
	      ume)  must be used.  By default, the server determines this date
	      for the save set based on	 the  retention	 policies  in  effect.
	      This  option  allows overriding the existing policies.  See also
	      nsrmm(8) and its -S & -e options.

       -w browse
	      Sets the date (in nsr_getdate(3) format) when the cloned saveset
	      will  become  non-browseable.   However,	a  saveset's  existing
	      browse policy is left unchanged if it is later than the intended
	      time  or	if  it has already passed, i.e. the saveset has become
	      non-browseable and is  in	 the  purged-from-index	 state.	  This
	      option  requires the -y retention option and must not be greater
	      than the retention time.	See also nsrmm(8)  and	its  -S	 &  -w
	      options.

       -S     Causes  nsrclone	to treat subsequent command line parameters as
	      save set identifiers, not volume names.	Save  set  identifiers
	      are  unsigned numbers.  You can find out the save set identifier
	      of a save set using the mminfo -v command (see mminfo(8)).   The
	      -S  option  is useful when you want to copy individual save sets
	      from a volume or all save sets matching an mminfo query (see the
	      examples	below).	  The  save  set  identifiers may also specify
	      exactly which copy of a save set with multiple copies to use  as
	      the  source.  To specify exact copies, use the ssid/cloneid for-
	      mat for each save set identifier.	 In this case,	the  ssid  and
	      the  cloneid  are	 unsigned numbers, separated by a single slash
	      (/).  You can find out the cloneid  for  a  particular  copy  by
	      using the mminfo -S report, or a custom report.

       -V     Causes  nsrclone	to treat subsequent command line parameters as
	      volume identifiers, not volume names.  Volume identifiers can be
	      found using the mminfo -mv report, for example.  This option can
	      not be used in conjunction with the -S option.

              Only one -V needs to be specified with multiple volids.   Multi-
              ple  -V's  may  cause this command to fail, see the CAVEATS sec-
              tion.

       -n     Do not execute. This option  causes  nsrclone  to  generate  and
              print  out  the  list  of savesets to be cloned but not actually
              perform the operation. The list is newline  terminated  and  the
              ids are of the form: ssid/cloneid.
                            
       -N saveset name
	      Specifies the saveset name for savesets that will be  considered
	      for cloning.

       -l level or range
	      Specifies	 the  level  or	 n1-n2	integer	 range from 0 to 9 for
	      savesets that will be considered for cloning. Use	 "manual"  for
	      ad-hoc   (client-initiated)  savesets,  "full"  for  level  full
	      savesets, "incr" for  level  incremental	savesets,  integers  0
	      through  9  (where 0 also means full), etc.  More than one level
	      can be specified by using multiple  -l  options  and/or  the  -l
	      n1-n2  range format. This option can only be used with the -t or
	      -e option.

       -e end time
	      Specify the end time (in nsr_getdate(3)  format)	for  selecting
	      save set IDs for cloning.	 This option can only be used with the
	      -S option.  If not specified, end time is set as	current	 time.
	      Please note that, -e 0 is same as -e today.

       -t start time
	      Specify  the start time (in nsr_getdate(3) format) for selecting
	      save set IDs for cloning.	 This option can only be used with the
	      -S option.  If not specified, start time is set as end time - 24
	      hours.  Please note that, -t 0 is same as -t today.  When speci-
	      fying  a time range, at least -t or -e option must be specified.

       -c client name
	      If client name is specified, only the  save  sets	 belonging  to
	      that  client will be selected.  More than one client name can be
	      specified by using multiple -c options. This option can only  be
	      used with the -t or -e option.

       -g group name
	      If  a  group  name is specified, only the save sets belonging to
	      that group will be selected. More than one  group	 name  can  be
	      specified	 by using multiple -g options.	It can be used with -c
	      option.  This option can only be used with the -t or -e  option.

       -m     Performs the actual migration (or stage) operation.

       -P     Instructs nsrclone to perform cleaning operation for one volume.
              Scans  a  volume for save sets with no entries in the media data
              base and recovers their space.  Space for recyclable and aborted
              save  sets  are also recovered from the volume with the save set
              entries removed from the media data base.  You can perform  this
              operation on disk family volumes.  This option must be specified
              with a -W option.

       -W volname
              Specifies the name of the volume to  be  cleaned.   This  option
              cannot be used with -S or -m options.

CAVEATS

       On  Linux, this command will fail when volids are specified with multi-
       ple -V's.  This behavior can  be  changed  by  setting  POSIXLY_CORRECT
       environment variable.
       

EXAMPLES

       Copy all save sets that begin on the volume mars.001 to a volume in the
       Offsite Clone pool:
       
	      nsrclone -b 'Offsite Clone' mars.001

       Copy all complete save sets created during the weekend. If no  time  of
       day  is	specified  with the date, nsr_getdate(3) uses midnight as the
       start time for copying all the complete save sets.  Only complete  save
       sets can be copied by nsrclone(8):
       
	      nsrclone -S `mminfo -r ssid \
		   -q '!incomplete,savetime>last saturday,savetime<last monday'`

       Copy a specific clone of a specific save set:
       
	      nsrclone -S 1538800517/770700786

       Copy  all save sets created between time 01/21/05 14:50:03 and 01/24/05
       14:50:03 for the group Default
       
	      nsrclone -S -t '01/21/05 14:50:03' -e '01/24/05 14:50:03' -g Default

       Copy all save sets created in the last 24 hours for clients "rose"  and
       "seam":
       
	      nsrclone -S -e now -c rose -c seam

       Copy  all save sets created in the last 24 hours for clients "rose" and
       "seam" with saveset names "/data1" and "/data2" for backup level "full"
       only:
       
	      nsrclone -S -e now -c rose -c seam -N /data1 -N /data2 -l full

       Copy  all save sets that were not copied to the default clone pool in a
       prior partially aborted nsrclone session, assuming  no  copies  existed
       prior to that aborted session:
       
	      nsrclone -S -e now -C 

       As in the preceding but with extended retention and browse periods:
       
	      nsrclone -S -e now -C 1 -y 12/12/2010 -w 12/12/2010

       Migrate  all  save  sets  from the volume mars.101 and jupiter.101 to a
       volume in the Offsite Clone pool:

              nsrclone -m -b 'Offsite Clone' mars.101 jupiter.101

       Migrate save sets 1234 and 4568 to a volume in the Offsite Clone pool:

              nsrclone -b 'Offsite Clone' -m -S 1234 4567

       Migrate clone instance 12345678 of save set 1234 to  a  volume  in  the
       Default Clone pool:

              nsrclone -m -S 1234/12345678

       Migrate  all  save  sets created since last Saturday to a volume in the
       Default Clone pool:

              nsrclone -m -S `mminfo -r ssid \
                   -q 'savetime>last saturday'`

       Recover space from volume jupiter.013:

              nsrclone -P -W jupiter.013

       Only complete save sets can be migrated by nsrclone(8).
       

SEE ALSO

      nsr_getdate(3), nsr_client(5), nsr_device(5), nsr_pool(5), nsr_stage(5),
      nsr_storage_node(5), mminfo(8), nsr(8), nsrd(8), nsrmmd(8),
      nsrndmp_save(8).


DIAGNOSTICS

       The exit status is zero if all of the requested save sets were cloned
       successfully, non-zero otherwise.

       Several messages are printed signaling that nsrd(8) is unavailable for
       cloning data; these are self-explanatory.  You may also see a message
       from the following list.

       adding save set series which includes parent ssid
              If running in verbose mode, this message is printed when nsr-
              clone notices that a requested save set is continued, requiring
              the entire series to be cloned (even if only part of the series
              was specified in the command line parameters).

       adding save set series which includes descendent ssid
              If running in verbose mode, this message is printed when nsr-
              clone notices that a requested save set is a continuation,
              requiring the entire series to be cloned.

       Cannot contact media database
              The media database (and most likely other NetWorker services as
              well) on the named server is not answering queries.  The server
              may need to be started, or if it was just started, it needs to
              finish its startup checks before answering queries.

       cannot clone save set number, series is corrupt
              The given save set is part of a save set series (used for saving
              very large files or filesystems), but not all of the save sets
              in the series were found in the media database.  This can happen
              if, for example, you relabel a tape that contains part of a save
              set series.

       cannot clone backup and archive data together
              Archive and backup data is fundamentally different and cannot be
              cloned to the same pool.  You need to run nsrclone twice, once
              to clone the backup save sets and once more for the archive save
              sets.

       cannot open nsrclone session with server
              This message is printed when the server does not accept clone
              sessions.

       cloning not supported; upgrade required
              Another enabler is required to use this feature.

       cloning requires at least 2 devices
              Cloning requires at least one read/write device and one read-
              only or read/write device, since data is copied from one volume
              directly to another.

       server does not support cloning
              The named server is not capable of cloning.

       each clone host needs at least two enabled devices
              When cloning between two storage nodes that share the same phys-
              ical drive, each node must have at least two enabled devices.

       error, no valid clones of ssid number
              The listed save set exists, but cannot be cloned because there
              are no complete copies of the save set. The save set was either
              aborted or is in progress.  Only complete save sets can be
              copied.

       error, user username needs to be on administrator list
              Only NetWorker administrators are allowed to make clones of
              backup save sets.  NetWorker administrators are listed in the
              NSR server resource, see nsr_service(5) for more information.
              For servers with archive capability, users listed in the NSR
              archive client's user list are allowed to clone archive save
              sets, as long as they have the "Monitor NetWorker" privilege;
              users listed in the NetWorker administrator list will also be
              able to clone archive save sets.

       no complete save sets to clone
              Only complete save sets can be copied, and no complete save sets
              were found matching the requested command line parameters.

       number is not a valid save set
              The given save set identifier is not valid.  Two forms are
              understood: simple save set identifiers and those with a cloneid
              specified.  Simple save sets are unsigned numbers.  The save set
              with the cloneid form is specified as two unsigned numbers sepa-
              rated by a single slash (/).

       pool is not a cloning pool
              The pool specified with the -b pool option is not a clone pool.
              You must always use a pool with a type of "Backup Clone" or
              "Archive Clone" for the -b option.

       save set number does not exist
              The given save set (from a -S save set list) does not exist.
              Verify your save set identifiers using mminfo(8).

       save set number crosses volumes; requesting additional volumes
              This message is printed in verbose mode when volume names or IDs
              were specified, but the given save set is only partially resi-
              dent on the listed volumes.  Since only complete save sets can
              be cloned, nsrclone automatically requests additional volumes.

       save set clone number/cloneid does not exist
              A specific clone of a save set was specified, but that save set
              has no clones with that clone identifier.	 Verify your save set
              identifiers using mminfo(8).

       volume name-or-number does not exist
              The given volume (either a volume name or a volume id specified
              in the -V option) does not exist in the media database.

       Cannot find volume name in media data base
              The volume name specified in the -W option does not exist in the
              media database.
              
       waiting 30 seconds then retrying
              A temporary error occurred and nsrclone will automatically retry
              the request until the condition is cleared.  For example, an
              error will occur if all devices are busy saving or recovering
              and nsrclone must wait for these devices become available.

       WARNING: Multiple concurrent cloning operations on the same
              savesets have been detected. The list of volumes reported below
              may not be accurate.
              nsrclone prints this message when it detects more clone
              instances than it expected.  This happens when more than one
              nsrclone commands are run on same saveset concurrently. Verify
              the clone volumes using mminfo(8).  Please note that the result
              of the clone operation is not affected by this warning.

       Space can only be recovered from disk family devices.
              The given volume (if you specified the -W option) is not a disk
              family volume.  This message is also printed after a successful
              migration of data from volumes of type other than a disk family
              device.

              
NetWorker 7.6.2			 Jul 14, 11			   nsrclone(8)