Technical Note: XTN503

XenData Re-Archive Utility

Updated May 8, 2008

About the XenData Re-Archive Utility
Rearchive is a command-line utility that is available from XenData Technical Support. It allows the administrator of a server running XenData Archive Series software to recover from error conditions by repeating the archive process for selected files or tape cartridges. The utility must be run from the Windows server running XenData Archive Series software. Please note that the rearchive utility does not operate on deleted files.

Terms used in this Technical Note

  • File Group is a collection of files that have the same file management policy and consequently are all treated in the same way by the system. Every file that is handled by the system belongs to exactly one File Group. If "Save to Tape" is enabled for a File Group, the files within that File Group will be saved to a Volume Set specified by the Administrator.
  • Volume If replication is not enabled, a Volume is an individual tape. If replication is enabled, a Volume consists of a primary tape and its replicas.
  • Volume Set This consists of one or more Volumes. It is a set of primary tapes with a defined number of replicas that store data from one or more File Groups.

Re-Archiving Individual Files
An individual file will be re-archived by running the utility with the following usage:

rearchive -f "<filename>" <options>

'filename' is case sensitive and must include the complete path.

'options' are:

'-a' is required to archive a file under all conditions. Otherwise it will only be archived if it is not already archived and replicated correctly.

'-l' will print a trace of the activity.

'-l <filename of log> will create a log file.

-r <number> replica number from which to restore offline fragments

The file will be written to the Volume Set specified in the File Group policy. Of course, "Save to Tape" must be enabled for that File Group. The tape on which the file was originally written need not be present for the re-archive operation to complete successfully. If the file is not present on RAID, the -r option may be specified to read the file from tape.

An example of usage is:

C:>rearchive -f "G:\folder1\file1.txt" -a

Re-Archiving Volumes
The rearchive utility can be used to scan the entire logical drive for files that have been archived to a particular Volume. It will then re-archive these files according to the current File Group settings.

The usage for re-archiving a complete Volume is:

rearchive -v "<volumeID>" <directory root> <options>

'volumeID' is either a XenData generated ID of the form XXXXXXXX-XXXXXXXX-XXXXXXXX or a user assigned name like 'Volume 1' or a name generated from the barcode like 'Barcode:000016'.

'directory root' is the logical drive letter followed by ' : ' (for example ' G:')

'options' are:

'-a' is required to archive all files. Otherwise only files that are not already archived and replicated correctly will be re-archived.

'-l' will print a trace of the activity.

'-l <filename of log> will create a log file.

'-s' will write files to the target in the same order as they were written to the original tape

'-r <number> replica number from which to restore offline fragments

Factors to consider before running the utility to re-archive a Volume are:

  • Re-archiving a Volume can be time consuming because all files on the logical drive are examined to determine if they were allocated to the specified Volume.
  • Every file will be written to the Volume Set specified in the File Group policy. Typically the rearchive utility will be run without changing the File Group policy. However, care should be taken to ensure that the files are re-archived to the correct Volume. This can be ensured by removing all other Volumes from the library when running the utility.
  • "Save to Tape" must be enabled for the applicable File Group or File Groups.
  • The tapes on which the files were originally written need not be present for the re-archive operation to complete successfully.
  • All files identified for re-archive must be on RAID, otherwise the rearchive utility must be configured to retrieve them from tape.
  • Care must be taken to ensure that sufficient resources are made available for the process to complete without excessive tape exchanges. For example excessive tape exchanges could occur when re-archiving flushed data to a replicated Volume Set, and using a library equipped with only two drives.
  • Ensure that sufficient disk space is available when re-archiving using the -r option, and writing to anything other than an immediately replicated volume set.

Examples of Re-Archiving a Non-Replicated Volume
When running the utility to re-archive files from a non-replicated Volume, the VolumeID can be the name of the individual tape, termed the "Medium Name" in the XenData Management Console.

A first example of usage is:

C:\>rearchive -v "Barcode:000016" G:

In this example, only the files from tape with a Medium Identity, Barcode:000016, that were not correctly archived to tape will be re-archived. This operation might be performed following failure of a tape write operation when there is concern that some files were not correctly archived.

A second example of usage is:

C:\>rearchive -v "Barcode:000016" G: -a

In this second example, all files archived (or designated for archiving) on the tape with a VolumeID, Barcode:000016, will be re-archived. This operation might be performed to replace a tape because its integrity is in doubt.

Examples of Re-Archiving a Replicated Volume
When running the utility to re-archive files from a replicated Volume, the VolumeID must be the XenData generated ID of the form XXXXXXXX-XXXXXXXX-XXXXXXXX. An example of usage is:

C:\>rearchive -v "4D61726B-00000000-3FFC373C" G:

To rearchive all files originally written to the volumeID "4D61726B-00000000-3FFC373C" dynamically retrieving flushed files from the primary replica, and echoing and saving to a log file an activity trace:

C:\>rearchive -v "4D61726B-00000000-3FFC373C" G: -r 0 -l -l c:\temp\logfile.log

Applicable Operating Systems

  • Windows Server 2008 R2
  • Windows Server 2012 R2
  • Windows Server 2016
  • Windows Server 2019

Applicable XenData Software
This technical note is applicable to:

  • Version 5 – Server Editions of Archive Series software
  • Version 6 – Server Editions of Archive Series software
  • Version 7 – Server Editions of Archive Series software including the Cloud File Gateway