Divide an archive into smaller archives
- Last UpdatedOct 03, 2024
- 2 minute read
- PI System
- PI Server
To break a single archive into smaller archives, invoke the offline archive utility once for each output file and use the same input file for all the outputs. Each invocation, specify a different start and end time in absolute PI time format.
For example, the following statements divide an archive into two smaller archives:
piarchss -if D:\pi\dat\bigfile.dat -of D:\pi\dat\january.dat
-filter_ex "1-jan-02" "1-Feb-02" -ost "1-jan-02" -oet "1-feb-02"
piarchss -if D:\pi\dat\bigfile.dat -of D:\pi\dat\february.dat
-filter_ex "1-feb-02" "1-mar-02" -ost "1-feb-02" -oet "1-mar-02"
In this example, january.dat and february.dat do not exist prior to the operation. The offline archive utility creates them as dynamic archives by default. After the offline archive utility creates the files, you can register them with piartool -ar, and then add events to the archive files in the usual way. Because these output archives are dynamic archives, they are not shiftable.
The option specifies the period between the start time and end time, and includes the start time but excludes the end time.
The output archive start and end times are explicitly specified.
Note: If the start or end time contains a space, for example , you must enclose the date string in double quotes.
Excluding the and flags results in the default behavior. For more details, see Specify a start time for the output file and Specify an end time for the output file.
If the input file was registered prior to the operation, it will be unregistered during the operation. When the operation is complete, you can use piartool -ar to register the file again.
For more information about using the piarchss utility, see Offline archive utility command-line options and Run the offline archive utility.
For more information about using the piartool utility, see piartool command-line options.
For information about avoiding duplicate events when you split an archive, see the Knowledge Base article, How to avoid duplicate events at the archive boundary when splitting a PI archive.