logrotate target

Syntax

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

no logrotate target

Description

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.log file, and authentication logs in the /var/log/auth.log file) or transferred to the configured remote destination target.

The no form 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.

Authority

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 target tftp://192.168.1.132

Setting an IPv6 target:

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

Removing a logrotate target :

switch(config)# logrotate target tftp://1.1.1.1 
switch(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)#