De-fragmenting an existing archive

About this task

A command line based tool is available to de-fragment an existing archive. This tool can be run on any existing archive(s). After the de-fragmentation, the new archive will be slightly smaller in size than the original one.

To de-fragment an archive using the tool:

Procedure

  1. Select a read-only archive to backup.
  2. Backup the archive.
  3. Transfer the archive from the production machine to another machine.
  4. Run the ihArchiveDefrag tool on the archive.
    -------------------------------------------------------------------------------
    Usage (Single File Mode): Operates on one archive at a time.
    
    ihArchiveDefrag [-v][-d][-y][-h][-s] SrcArchive [DestArchive] [Config.ihc]
    
    -------------------------------------------------------------------------------
    Usage (Directory Mode): Processes all archives in the source directory.
    
    ihArchiveDefrag [-v][-d][-y][-h][-s] SrcDir [DestDir] [Config.ihc]
    
    -------------------------------------------------------------------------------
    
          [-v]   Verbose logging to the logfile.
          [-c]   Skip the defrag step.  Only compare/verify the archives.
          [-d]   Skip the verify step.  Only defrag the archive.
          [-h]   Displays this help information.
          [-s]   Source is on a SSD.  Skip the pre-read step as it is not needed.
          [-y]   Yes.  Don't ask questions, answer YES.  Just do the work.
    
      * The Config.ihc is only needed for 4.0 or older archives
      * If the DestArchive is not provided, a name will be generated.
      * In directory mode, if the DestDir is not provided a new directory called 'DefragFiles' will be created under the SrcDir.
    
    Examples:
    
       ihArchiveDefrag User_Node_Archive001.iha
       ihArchiveDefrag User_Node_Archive001.iha D:\Output\User_Node_Archive001.iha
       ihArchiveDefrag -y c:\Historian\Archives\Backups
       ihArchiveDefrag -y c:\Historian\Archives\Backups d:\DefragOuput
    
    Note:
    • As part of this process the source archive MAY be modified, It is HIGHLY recommended that this tool be run on a disposable copy of the archive just in case it is modified.
    • De-fragmenting an archive is a disk intensive operation and can be slow (minutes to hours to run). Running on a machine with memory greater than twice the archive size is helpful.
    • If the performance is not satisfactory it is recommended that the source archive be on an SSD when running ihArchiveDefrag.
    • It is recommended that de-fragmentation should not be run on a production system as it can affect the performance of the production system.
  5. Transfer the resulting new archive back to the production machine.
  6. Unload the existing archive.
  7. Load the new de-fragmented archive.