p4 export

Extract journal or checkpoint records.

Syntax

p4 export -c token [-J prefix] [-f] [-l lines] [-F filter] 
          [-T tableexcludelist] [-P filterpattern]
p4 export -j token [-J prefix] [-f] [-l lines] [-F filter] 
          [-T tableexcludelist] [-P filterpattern]
p4 export -j token [-J prefix] -r [-F filter] 
          [-T tableexcludelist] [-P filterpattern]

Syntax conventions

Description

This command reports checkpoint and journal metadata from a Helix Core 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.

Options

-c

Specifies a checkpoint number or position token of the form checkpointnum#byteoffset.

-f

Format the output so that non-textual datatypes are formatted appropriately.

-F filter

Limit output to records that match the specified filter pattern. For example, -F "table = db.configure".

-j

Specify a journal number or position token of the form journalnum/byteoffset.

-J prefix

Specifies a filename prefix for the journal, such as that used with p4d -jc prefix.

-l lines

Limit output to the specified number of lines of journal records.

-P filterpattern

Limit output to records that match the specified filter pattern. Multiple filter patterns can be specified with multiple -P options.

Each filterpattern begins with two characters and a colon, and specifies either a client filter or a depot filter, as well as whether the pattern is to be included or excluded, using the syntax:

  • -Pic://client/pattern - client records to include
  • -Pxc://client/pattern - client records to exclude
  • -Pif://depot/pattern - depot records to include
  • -Pxf://depot/pattern - depot records to exclude

The first character specifies whether the records are included or excluded ("i" or "x"), the second character specifies whether the records are client workspace-related or depot-file related ("c" or "f"), the colon is a separator, and the remainder of the filterpattern denotes either a client workspace view or a depot file path.

The mechanism by which this filtering is implemented is the same as that which is used by the ClientDataFilter: and RevisionDataFilter fields in the p4 server form.

-r

Display raw journal output; this argument applies to journals only.

-T tableexcludelist

Supply a list of database tables (for example, db.have and db.client) to exclude from export.

Limit output to records that match the specified filter pattern. For example, -T db.have,db.client or -T "db.have db.client".

g-opts

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

super

available to an service user

Compressed journals or checkpoints are not supported.

Examples

p4 export -T "db.have db.working"

Run p4 export, but ignore records in the db.have and db.working tables.

Related commands

To replicate metadata from one server to another

p4 replicate

To pull journal records (and file content) from a master server to a replica server

p4 pull