Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Reference | 2025.1

# p4 unzip

Import files from a `p4 zip` package file.

## Syntax

    p4 [g-opts] unzip -i zipfile [-Ox] [-f -n -A -I -v --enable-dvcs-triggers]

Syntax conventions

## Description

The infrequently used combination of p4 zip and p4 unzip is one way an administrator can bring over a set of files (and their history) from the original server to the root directory of the target server. One use case is to transfer files over an "air gap" where there is no network connection or Perforce replication between the two P4 servers.

This process involves the manual step of the administrator copying onto the target server the file that contains the archive. See the Perforce Knowledge Base article, "How to move data from one Perforce VCS server to another Perforce VCS server using p4 zip and p4 unzip".

Typically, an organization will instead use an automated solution for data (and metadata) across multiple servers. See the "Deployment architecture" chapter of the P4 Server Administration Documentation.

The p4 unzip operation imports:

- the specified set of files (such as source code and graphics)
- the changelists that submitted those files
- the files' attributes
- any fixes association with the changelists
- all integration records that describe integrations to the files being unzipped

The value of the `rpl.checksum.change` configurable determines the level of verification performed for the `p4 unzip` command. See Configurables.

### Triggering when unzipping

The following push trigger types can be invoked during the execution of the `p4 unzip` command:

- The `push-submit` trigger can customize processing during the phase of the `p4 unzip` command when metadata has been transferred, but files have not yet been transferred.
- The `push-content` trigger can customize processing during that phase of the `p4 unzip` command when files have been transferred, but their contents have not yet been committed.
- The `push-commit` trigger can do any clean up work or other post processing after changes have been committed by the `p4 unzip` command.

To enable push triggers for the `p4 unzip` command, use the `--enable-dvcs-triggers` option.

For more information, see the section "Triggering on pushes and fetches" in the P4 Server Administration Documentation.

## Options

`-A` | Include the archive content of the new revisions.
`--enable-dvcs-triggers` | Enable any push triggers when the specified file is processed. Push triggers are disabled by default for the `p4 unzip` command. For more information about these kinds of triggers, see the chapter "Using triggers to customize behavior" in the P4 Server Administration Documentation.
`-f` | Bypasses the checks for change overwrite, license, and missing archive.
`-i zipfile` | Specifies the zip file name.
`-I` | Excludes integration records for the new revisions.
`-n` | Performs all the correctness checks, but does not push any files or changelists to the remote server.
`-Oc` | When set, the `p4 unzip` command outputs information about every changelist. The `-v` option must be set for this to take effect.
`-Of` | When set, the `p4 unzip` command outputs information about every file in every changelist. The `-v` option must be set for this to take effect.
`-Oi` | When set, the `p4 unzip` command outputs information about every integration in every file in every changelist. The `-v` option must be set for this to take effect.
`-v` | Specifies verbose mode, which provides diagnostics for debugging. You must opt in to verbose mode. With verbose mode turned on, you can refine and control the precise level of verbosity. Specifically, you can indicate whether you want information about: every changelist unzipped every file in every changelist unzipped every integration of every file in every changelist unzipped You can specify any combinations of these options, but must always include the `-O`. The default is to display information about every changelist.
`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 | `admin`

## Related commands

Package a set of files and their history for use by `p4 unzip` | `p4 zip`

Your search for returned results