Command introduced before JUNOS Release 7.4.
Archive, and optionally compress, one or multiple local system files as a single file, locally or at a remote location.
destination destination — Destination 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 source — Source 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.
maintenance
When you enter this command, you are provided feedback on the status of your request.
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>
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>