p4 export
Extract journal or checkpoint records.
Syntax
p4 export -c token [-J prefix] [-f] [-l lines] [-F filter]
[-T tableexcludelist] [-P filterpattern]
[-s serverID] [-t type]
p4 export -j token [-J prefix] [-f] [-L] [-l lines] [-F filter]
[-T tableexcludelist] [-P filterpattern]
[-s serverID] [-t type]
p4 export -j token [-J prefix] -r [-L] [-F filter]
[-T tableexcludelist] [-P filterpattern]
[-s serverID] [-t type]
p4 export -j token -s serverID [-t type] -A
p4 export -j token {-i seconds | -I milliseconds} [-J prefix] [-f]
[-F filter] [-T tableexcludelist] [-P filterpattern]
[-s serverID] [-t type]
Description
This command reports checkpoint and journal metadata from a P4 Server server. With no options, the records are reported in tagged form.
Some fields are added to the tagged output to indicate either transactional consistency, or to indicate the end of the journal.
To filter database tables out of the exported data, use the
-T option with a list of tables whose data you wish to
exclude. To exclude data from multiple tables, separate the table names
by spaces or commas. The table names must begin with "db.",
following the naming convention used for database files in the server
root directory. If you separate the table exclusion list with spaces, you
must enclose the list in quotes.
Run in follow mode
By default, p4 export stops when it reaches the current end of the journal. To keep the connection open and stream new journal records as the server writes them, run the command in follow mode by specifying -i seconds or -I milliseconds. The value sets how often the command checks for new records.
- If you specify both
-iand-I, the-Ivalue is used. - An interval of
0uses the value of therpl.awaitjnl.intervalconfigurable. - An interval shorter than 100 milliseconds is raised to 100 milliseconds.
- Follow mode has no idle timeout. The command runs until the client disconnects or, if monitor is enabled, an administrator ends it with
p4 monitor terminate. - You can't use
-ior-Iwith-A,-c,-l,-L, or-r.
Register a journal consumer
An application that reads the journal with p4 export can identify itself with -s serverID and, optionally, -t type. The server then records the application in the server topology when it connects, so it appears in the output of p4 topology. To report how far the application has processed the journal, run p4 export -A with the same server ID and the journal position. That position then appears in the output of p4 servers.
Options
| Option | Description |
|---|---|
|
|
Acknowledge a journal position without exporting any records. The position you specify with |
|
|
Specifies a checkpoint number or position token of the form
|
|
|
Format the output so that non-textual datatypes are formatted appropriately. |
|
|
Limit output to records that match the specified
|
|
|
Run in follow mode, checking for new journal records every |
|
|
Run in follow mode, checking for new journal records every |
|
|
Specify a journal number or position token of the form
|
|
|
Specifies a filename prefix for the journal, such as that used
with |
|
|
Limit output to the specified number of
|
|
|
Limit output to records up to and including the logical end of file (LEOF), which is the highest journal position that the required number of standby replicas have persisted. The required number is set by the |
|
|
Limit output to records that match the specified filter pattern.
Multiple filter patterns can be specified with multiple
Each
The first character specifies whether the records are included
or excluded (" The mechanism by which this filtering is implemented is the same
as that which is used by the |
|
|
Display raw journal output; this argument applies to journals only. |
|
|
Register the caller in the server topology at connect time with the specified server ID, so that it appears in the output of p4 topology. The topology entry is refreshed each time the caller runs |
|
|
Specify the service type to record in the server topology, which is the name of the application that runs |
|
|
Supply a list of database tables (for example,
Limit output to records that match the specified
|
|
|
See Global options. |
Usage notes
| Can file arguments use revision specifier? | Can file arguments use revision range? | Minimal access level required |
|---|---|---|
|
N/A |
N/A |
available to an service user |
Compressed journals or checkpoints are not supported.
Examples
|
|
Run |
|
|
Export the records in the current journal, number 42, and keep streaming new records as the server writes them, checking for new records every 5 seconds. |
|
|
Record that the consumer registered as |
Related commands
|
To replicate metadata from one server to another |
|
|
To pull journal records (and file content) from a target server The immediately upstream server for replica servers, edge servers, standby servers, proxies and brokers. See also 'upstream server' and 'central server'. to a replica server |