pblogarchive

  • Version 8.5 and earlier: pblogarchive not available.
  • Version 9.0 and later: pblogarchive available.

pblogarchive is the log archiving utility that can archive I/O logs and event logs from the original logserver onto an archive host.

It is installed on hosts configured as log servers and policy servers. It must be called from a host containing the event logs or I/O logs to be archived.

You must be logged in as root to use pblogarchive.

Syntax

pblogarchive [options]
   -e, --eventlog [filepathname]
   -E, --eventlogbase "<shell pattern>"
   -i, --iolog <filepathname>
   -I, --iologbase "<shell pattern>"
   -s, --serverinfo <archivehost>
   -l, --list[e|i]
pblogarchive -v | --version
pblogarchive -h | --help

Arguments

-e

Archive the event log specified in the settings file.

Cannot be combined with the I/O log options (-i, -I).

--eventlog

[=filepathname]

Archive an event log. Provide the absolute file path name of the event log to archive. If file path name is omitted, pblogarchive determines the event log from the settings file.

Cannot be combined with the I/O log options (-i, -I).

-E, --eventlogbase

"shell_pattern"

Archive event log(s) matching the shell pattern. Shell pattern must be enclosed in quotes.

Cannot be combined with the I/O log options (-i, -I).

-i, --iolog

<filepathname>

Archive the specified I/O log.

Cannot be combined with the event log options (-e, -E).

-I, --iologbase

"shell_pattern"

Archive I/O log(s) matching the shell pattern. Shell pattern must be enclosed in quotes.

Cannot be combined with the event log options (-e, -E).

-s, --serverinfo

<archivehost>

Specify the name or IP address of the destination archive host. This overrides logarchivehost in pb.settings.

-l, --list[e|i]

List logfile locations in the log tracking DB.

-le: Lists only event log information.

-li: Lists only I/O log information.

For event logs, displays the name of the original logserver, event log creation datetime in UTC, event log archive datetime in UTC(when the event log was first rotated), original event log path, current host where logfile is located/archived, and the current path name of the logfile.

For I/O logs, displays the name of the original logserver, I/O log creation datetime in UTC, uniqueid associated with the I/O log, I/O logfile sequence number if partitioned, original I/O log path, current host where logfile is located/archived, and the current path name of the logfile.

Archives the event log named by the eventlog setting in pb.settings:
pblogarchive -e
Archives a specific event log:
pblogarchive --eventlog=/var/log/my90pb.eventlog_20150512_161106
Archive multiple event logs using a filename shell pattern:
pblogarchive -E "/var/log/my90pb.eventlog_2015*"
Archive a specific I/O log:
pblogarchive -i /var/log/iolog/my90iolog.7ZSa1y
Archive multiple I/O logs using a filename shell pattern:
pblogarchive -I "/var/log/iolog/my90iolog.7*"
Archive an event log to a specific archive host (override settings file):
pblogarchive -s archost21 --eventlog=/var/log/my90pb.eventlog_20150512_161106
List event log location as recorded by the log tracking database:
#pblogarchive -le

List of Event Logs:

Orig_Logserver,Date_Created_UTC,Date_Archived_UTC,Orig_Path,Current_Host,Current_Path

dev-erolnd-01.unix.ca.com,2015-05-2802:49:21,-,/var/log/ABCac90pb.eventlog,dev-erolnd-01.unix.ca.com,/var/log/ABCac90pb.eventlog

dev-erolnd-01.unix.ca.com,2015-05-28 02:48:00,2015-05-28
02:48:00,/var/log/ABCac90pb.eventlog,dev-erolnd-01.unix.ca.com,/var/log/ABCac90pb.eventlog_20150527_194800

dev-erolnd-01.unix.ca.com,2015-05-28 02:43:01,2015-05-28
02:44:34,/var/log/ABCac90pb.eventlog,dev-erolnd-01.unix.ca.com,/opt/ARCHIVELOGS3/eventlog/dev-erolnd-01.unix.ca.com/ABCac90pb.eventlog_20150527_194433
List I/O log location as recorded by the log tracking database
# pblogarchive -li

List of IO Logs:

Orig_Logserver,Date_Created_UTC,Unique_Id,Partial_Id,Orig_Path,Current_Host,Current_Path
dev-erolnd-01.unix.ca.com,2018-09-18 18:25:53,ac1420205ba1435717DE,1,/var/log/pbsudo/dev-eolog-08.unix.ca.com/pbsudo.iolog.kAWJLT,dev-erolnd-02.unix.ca.com,/opt/iolog/dev-eolog-08.unix.ca.com/testuser/20180918/pbsudo.iolog.kAWJLT.ac1420205ba1435717DE