Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

archive (Individual System Log File)

Syntax

Hierarchy Level

Description

Configure archiving properties for a specific system log file.

Options

archive-sites site-name—FTP URL representing the destination for the archived log file (for information about how to specify valid FTP URLs, see Format for Specifying Filenames and URLs in Junos OS CLI Commands). If more than one site name is configured, a list of archive sites for the system log files is created. When a file is archived, the router attempts to transfer the file to the first URL in the list, moving to the next site only if the transfer does not succeed. The log file is stored at the archive site with the filename specified at the [edit system syslog] hierarchy level.

files number—Maximum number of archived log files to retain. When the Junos OS logging utility has written a defined maximum amount of data to a log file logfile, it closes the file, compresses it, and renames it logfile.0.gz (the amount of data is determined by the size statement at this hierarchy level). The utility then opens and writes to a new file called logfile. When the new file reaches the maximum size, the logfile.0.gz file is renamed to logfile.1.gz, and the new file is closed, compressed, and renamed logfile.0.gz. By default, the logging facility creates up to ten archive files in this manner. Once the maximum number of archive files exists, each time the active log file reaches the maximum size, the contents of the oldest archive file are lost (overwritten by the next oldest file).

  • Range: 1 through 1000

  • Default: 10 files

password password—Password for authenticating with the site specified by the archive-sites statement.

size size—Maximum amount of data that the Junos OS logging utility writes to a log file logfile before archiving it (closing it, compressing it, and changing its name to logfile.0.gz). The utility then opens and writes to a new file called logfile.

  • Syntax: xk to specify the number of kilobytes, xm for the number of megabytes, or xg for the number of gigabytes

  • Range: 64 KB through 1 GB

  • Default: 128 KB for J Series routers; 1 MB for M Series, MX Series, and T Series routers, and the QFX3500 switch; 10 MB for TX Matrix and TX Matrix Plus routers

start-time "YYYY-MM-DD.hh:mm"—Date and time in the local time zone for a one-time transfer of the active log file to the first reachable site in the list of sites specified by the archive-sites statement.

transfer-interval interval—Interval at which to transfer the log file to an archive site.

  • Range: 5 through 2880 minutes

world-readable | no-world-readable—Grant all users permission to read archived log files, or restrict the permission only to the root user and users who have the Junos OS maintenance permission.

  • Default: no-world-readable

Required Privilege Level

system—To view this statement in the configuration.

system-control—To add this statement to the configuration.

Release Information

Statement introduced before Junos OS Release 7.4.

start-time and transfer-interval statements introduced in Junos OS Release 8.5.