[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

file archive

Syntax

file archive destination destination source source
<compress>

Release Information

Command introduced before JUNOS Release 7.4.

Description

Archive, and optionally compress, one or multiple local system files as a single file, locally or at a remote location.

Options

destination destinationDestination of the archived file or files. Specify the destination as a URL or filename. The JUNOS Software adds one of the following suffixes if the destination filename does not already have it:

source sourceSource of the original file or files. Specify the source as a URL or filename.

compress — (Optional) Compress the archived file with the GNU zip (gzip) compression utility. The compressed files have the suffix .tgz.

Required Privilege Level

maintenance

List of Sample Output

file archive (Multiple Files)
file archive (Single File)
file archive (with Compression)

Output Fields

When you enter this command, you are provided feedback on the status of your request.

Sample Output

file archive (Multiple Files)

The following sample command archives all message files in the local directory /var/log/messages as the single file messages-archive.tar in the same directory:

user@host> file archive source /var/log/messages* destination /var/log/messages-archive.tar
/usr/bin/tar: Removing leading / from absolute path names in the archive.
user@host>

file archive (Single File)

The following sample command archives one message file in the local directory /var/log/messages as the single file messages-archive.tar in the same directory:

user@host> file archive source /var/log/messages destination /var/log/messages-archive.tar
/usr/bin/tar: Removing leading / from absolute path names in the archive.
user@host

file archive (with Compression)

The following sample command archives and compresses all message files in the local directory /var/log/messages as the single file messages-archive.tgz in the same directory:

user@host> file archive compress source /var/log/messages* destination /var/log/messages-archive.tgz
/usr/bin/tar: Removing leading / from absolute path names in the archive.
user@host>

[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]