Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Configuring Log Rotation (SRC CLI)

 

To configure log rotation, you need to configure the FTP server where files are uploaded and stored, and configure the SRC upload client.

You perform the following tasks to configure log rotation:

Configuring the FTP Server for Log Rotation (SRC CLI)

This procedure is optional. You are not required to configure a remote FTP server. If you do not configure a server, the SRC file upload client simply deletes the older files and compresses and stores the specified n number of the most recent files in the backup directory.

Note

The SRC software uses passive mode on the outgoing connections to the FTP server. The FTP server must support passive mode.

Use the following configuration statements to configure the FTP server used for log file rotation:

To configure the FTP server information for log file rotation:

  1. (Optional) From configuration mode, access the configuration statement used to configure the FTP server. In this sample procedure, the upload client is named acct_file and the server is named kimberly.

  2. Specify the FTP server to connect to for file uploading.

  3. (Optional) Specify the username to log in to the FTP server.

  4. (Optional) Specify the password to log in to the FTP server.

  5. (Optional) Configure the port number for the FTP server.

  6. Specify the directory on the remote server where you want to store the uploaded files.

  7. Verify the configuration for the remote FTP server.

Configuring the Upload Client for Log Rotation (SRC CLI)

Use the following configuration statements to configure the file upload client:

To configure the file upload client for log rotation:

  1. From configuration mode, access the configuration statement for configuring the file upload client for log rotation. You can configure multiple uploads. Each upload client must have a unique name. In this sample procedure, the upload client is named “acct_file.”

    For example, to configure an upload named acct_file:

  2. Specify the directory path and filename pattern you want to upload from the C Series Controller disk to the remote server. After the file upload is successfully completed, the files are deleted from the local disk.

    For example, to upload all accounting files located in the /opt/UMC/sae/var/acct directory, that begin with “log”:

  3. Configure the delay in seconds to connect to the upload server; the upload client waits a random time between 1 and this specified delay to connect to the remote server.

  4. (Optional) Configure the retry time interval. If the upload fails, this is the amount of time in seconds that the upload client waits before trying the upload again.

  5. (Optional) Specify the time interval, in hours, for uploading files.

    Note

    Uploading large files can consume disk, CPU, and network resources. We recommend scheduling uploads at a specific time of day when use of these resources does not impact users on the network.

  6. Configure the time to start file uploading in a form of hh:mm in 24-hour format—for example, “13:40.”

  7. (Optional) Specify the number of the most recent files you want to keep on the local disk after the files have been successfully uploaded to the remote server. After successfully being uploaded to the remote server, this number of files are compressed and moved to a subdirectory of the current directory.

  8. (Optional) Append a suffix to the files that are uploaded to the remote server. If this attribute is not set, nothing is appended to the filenames that are uploaded to the remote server.

    Where append is one of the following:

    • time-stamp—Append a timestamp in the form of “-YYYYMMDDHHMMSS” to the end of the file.

    • host-name—Append the hostname in the form of “-hostname” to the end of the file.

    • time-stamp-and-host-name—Append both a timestamp and hostname in the form of “-YYYYMMDDHHMMSS-hostname” to the end of the file.

  9. Verify the configuration.

Related Documentation