Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All
     

    Related Documentation

     

    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:

    system file-uploading-specifications name ftp {server server;user-name user-name;password password;port port;destination-path destination-path;}

    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.
      [edit]user@host# edit system file-uploading-specifications acct_file ftp
    2. Specify the FTP server to connect to for file uploading.
      [edit system file-uploading-specifications acct_file ftp]user@host# set server kimberly
    3. (Optional) Specify the username to log in to the FTP server.
      [edit system file-uploading-specifications acct_file ftp]user@host# set user-name user-name
    4. (Optional) Specify the password to log in to the FTP server.
      [edit system file-uploading-specifications acct_file ftp]user@host# set password password
    5. (Optional) Configure the port number for the FTP server.
      [edit system file-uploading-specifications acct_file ftp]user@host# set port port
    6. Specify the directory on the remote server where you want to store the uploaded files.
      [edit system file-uploading-specifications acct_file ftp]user@host# set destination-path destination-path
    7. Verify the configuration for the remote FTP server.
      [edit system file-uploading-specifications acct_file ftp]
      user@host# show
      destination-path /accounting/logs;
      password ********;
      port 1220;
      server kimberly;
      user-name jsmith;
      
      

    Configuring the Upload Client for Log Rotation (SRC CLI)

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

    system file-uploading-specifications name {file-search-pattern [file-search-pattern...];random-delay random-delay;retry-time retry-time;interval (1 | 2 | 3 | 4 | 6 | 8 | 12 | 24);start-time start-time;keep keep;append (time-stamp | host-name | time-stamp-and-host-name);}

    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.”
      [edit]user@host# edit system file-uploading-specifications name

      For example, to configure an upload named acct_file:

      [edit]user@host# edit system file-uploading-specifications 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.
      [edit system file-uploading-specifications acct_file]user@host# set file-search-pattern file-search-pattern

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

      [edit system file-uploading-specifications acct_file]user@host# set file-search-pattern /opt/UMC/sae/var/acct/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.
      [edit system file-uploading-specifications acct_file]user@host# set random-delay random-delay
    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.
      [edit system file-uploading-specifications acct_file]user@host# set retry-time retry-time
    5. (Optional) Specify the time interval, in hours, for uploading files.
      [edit system file-uploading-specifications acct_file]user@host# set interval (1 | 2 | 3 | 4 | 6 | 8 | 12 | 24)

      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.”
      [edit system file-uploading-specifications acct_file]user@host# set start-time start-time
    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.
      [edit system file-uploading-specifications acct_file]user@host# set keep keep
    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.
      [edit system file-uploading-specifications acct_file ftp]user@host# set append (time-stamp | host-name | time-stamp-and-host-name);

      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.
      [edit system file-uploading-specifications acct_files]
      user@host# show
      file-search-pattern '/opt/UMC/sae/var/acct/log*';
      ftp {
        destination-path /accounting/logs;
        port 1220;
      ..server kimberly;
      ..user-name jsmith;
      }
      interval 24;
      keep 3;
      append time-stamp;
      random-delay 3; retry-time 3600; start-time 00:00;
     

    Related Documentation

     

    Modified: 2016-12-29