Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ PI Server Installation and Configuration (PI Server 2024 R2)

Reinitialize manually (Data Archive 2010 R3 and earlier)

Reinitialize manually (Data Archive 2010 R3 and earlier)

  • Last UpdatedOct 02, 2024
  • 3 minute read

If you cannot use Collective Manager, you can manually reinitialize each secondary server in your Data Archive collective when necessary.

  1. Back up the primary Data Archive server using the Backups tool in PI System Management Tools (Operation > Backups).

  2. Manually copy all of the backup files from the primary Data Archive server to a temporary directory on the secondary Data Archive server.

  3. Delete the following files from the copy of the backup on the secondary Data Archive server:

    • pitimeout.dat

    • pibackuphistory.dat

  4. If the installation directory on the secondary server differs from the primary server, delete the pisubsys.cfg file from the dat directory in the temporary directory that contains the backup files.

  5. Shut down the secondary Data Archive server.

  6. Restore the secondary Data Archive server:

    1. Create a command file, pirestore.bat, in the ..\PI\adm directory:

      @rem Restore PI files
      @rem $Workfile: pirestore.bat $ $Revision: 1 $
      @rem
      @setlocal
      @rem default source: current directory
      @set pi_s_dir=%cd%
      @rem default destination based on PISERVER symbol
      @set pi_d_dir=%PISERVER%
      @rem default archive destination set later based on pi_d_dir
      @set pi_arc=
      @
      @if [%1] == [] (goto usage)
      @goto loop
      @:shift3_loop
      @shift
      @:shift2_loop
      @shift
      @:shift1_loop
      @shift
      @:loop
      @if [%1] == [-source] set pi_s_dir=%2%
      @if [%1] == [-source] goto shift2_loop
      @if [%1] == [-dest] set pi_d_dir=%2%
      @if [%1] == [-dest] goto shift2_loop
      @if [%1] == [-arc] set pi_arc=%2%
      @if [%1] == [-arc] goto shift2_loop
      @if [%1] == [-go] goto shift1_loop
      @if [%1] == [-?] goto usage
      @if [%1] == [?] goto usage
      @if [%1] == [] goto loop_end
      @echo Unrecognized argument "%1%"
      @goto usage
      @
      @:loop_end
      @if [%pi_d_dir%] == [] echo Specify argument -dest or set environment variable PISERVER
      @if [%pi_d_dir%] == [] (goto usage)
      @
      @set pi_adm=%pi_d_dir%\adm
      @set pi_bin=%pi_d_dir%\bin
      @set pi_dat=%pi_d_dir%\dat
      @
      @if [%pi_arc%] == []
      set pi_arc=%pi_d_dir%\dat
      @
      @
      @echo Copying the files to the target directories
      xcopy /r /y "%pi_s_dir%\adm\*.*" "%pi_adm%"
      xcopy /r /y "%pi_s_dir%\bin\*.*" "%pi_bin%"
      xcopy /r /y "%pi_s_dir%\dat\*.*" "%pi_dat%"
      xcopy /r /y "%pi_s_dir%\arc\*.*" "%pi_arc%"
      @
      @goto bat_end
      @
      @:usage
      @echo. usage: pirestore.bat [-source s_dir][-dest d_dir][-arc a_dir][-go]
      @echo.
      @echo. Delete from d_dir\log\
      @echo. message log files pimsg_*.dat
      @echo. audit files pi*ssAudit.dat
      @echo. copy archive files from s_dir\arc to a_dir
      @echo. copy other files from s_dir\* to d_dir
      @echo.
      @echo. s_dir source directory. default %%cd%%
      @echo. d_dir destination directory. default %%PISERVER%%
      @echo. a_dir archive destination directory. default d_dir\dat
      @echo. -go prevents accidental execution with no arguments
      @echo.
      @:bat_end

    2. Open a command window on the computer that hosts the secondary Data Archive server.

    3. Navigate to the ..\PI\adm directory.

    4. Enter:

      pirestore -source backupdirname -arc destinationarcdirname

      where backupdirname specifies the temporary directory containing the backup files and destinationarcdirname specifies the archive directory where the files will be restored.

      For example, if you copied the backup files to the C:\temp\pibackup directory, and will restore them to C:\PI\dat, then you would enter \C:\temp\pibackup in place of backupdirname and \C:\PI\dat in place of destinationarcdirname.

  7. If the location of the archive files on the secondary Data Archive server differs from the primary Data Archive server, recreate the archive manager data file (piarstat.dat):

    1. In the command window, navigate to the ..\PI\adm directory.

    2. Enter:

      pidiag –ar path

      where path is the full path to the primary archive file.

    3. Use the Archives tool in PI System Management Tools (Operation > Archives) to register the new primary archive on the secondary Data Archive server.

  8. Restart the secondary server.

  9. If you recreated the archive manager data file, use the piartool –ar command to re-register any secondary archive files:

    1. At the command prompt, navigate to the ..\PI\adm directory.

    2. Enter:

      piartool –ar path

      where path is the path to the secondary archive file you want to re-register.

TitleResults for “How to create a CRG?”Also Available in