logrotate target

Syntax

logrotate target {tftp://| tftp://< IPV6_ADDR >} no logrotate target

描述

Specifies the target remote host Universal Resource Identifier (URI) using TFTP protocol to allow transfer of rotated and compressed files to a remote target. Rotated log files are stored locally (event logs in the/var/log/event.logfile, and authentication logs in the/var/log/auth.logfile) or transferred to the configured remote destination target.

The没有形式of this command resets the target to the default, which stores the rotated and compressed log files locally in/var/log/.

Command context

config

Parameters

<IPV4_ADDR>

Specifies an IPv4 IP Address location for log file storage.

<IPV6_ADDR>

Specifies an IPv6 IP Address location for log file storage.

权威

Administrators or local user group members with execution rights for this command.

Usage

To transfer rotated log files remotely, use the TFTP protocol only, and make sure that the rotated log file is less than 32 MB in size. Use the Linux TFTP command to transfer the file. The rotated log file is removed from the local path/var/log/when the log file is moved to a TFTP server.

Examples

Setting an IPv4 target:

switch(config)#logrotate targettftp://192.168.1.132

Setting an IPv6 target:

switch(config)#logrotate targettftp://2001:db8:0:1::128

Removing alogrotate目标:

switch(config)#logrotate targettftp://1.1.1.1switch(config)# do show logrotate Logrotate configurations : Period : daily Maxsize : 10MB Target : tftp://1.1.1.1 switch(config)# no logrotate target switch(config)# do show logrotate Logrotate configurations : Period : daily Maxsize : 10MB switch(config)#