Old File Remover

You can enable your Oracle Communications Session Border Controller to clean up old files automatically by configuring the exact directories in which those files resides and the time at which they should be purged. To enable this capability, you use the directory-cleanup and cleanup-time-of-day settings in the system configuration.

For each directory you want cleaned, you identify the directory path as explicitly as possible (beacuse subdirectories are not cleaned) and the age of the files to remove from the directory. The configuration allows you to turn each file remover on and off, setting the admin-state parameter to enabled for on and disabled for off. You also set the time of day, in hours and minutes in local time, to identify when the system performs the clean-up.

Specifics and Caveats

This section calls out special safeguards, limitations, and cautions to note before you enable file removal.

Protected Directories

As a preventive measure, the Oracle Communications Session Border Controller does not permit you to remove files from the following directories (and their subdirectories) that are vital to correct system functioning:

  • /code—Contains essential system files.
  • /boot—Contains essential system files.
  • /opt/logs—Contains all logs, including: CLI audit logs, the support info to-file, the show config to-file. However, you can still use the log cleaner function configurable under the system configuration’s options parameter.
  • /opt/collect—Contains all HDR files.

If you try to configure any of these directories, the system will deem your entry invalid.

Paritally Protected Directories

The direcories listed below cannot be cleaned themselves, though you can clean their subdirectories:

  • The CDR file path—Configured in the accounting configuration’s file-path parameter. If configured, cleaning this directory would interfere with proper operation of the FTP push capacbility you can establish as part of your accounting configuration; it would interfere with file rotation and deletion. The Oracle Communications Session Border Controller will return an warning when you verify your configuration if you mark this file path as one to clean. This warning informs you that the Oracle Communications Session Border Controller will not be cleaned.
  • /opt—Apart from its subdirectories, this directory contains files that could be vital to proper system functioning. If you try to enter the main /opt directory, the system will deem your entry invalid.

Cleanup Daily Time

This section shows you how to configure the Oracle Communications Session Border Controller to clean up old files daily at a specified time. This feature is RTC-supported, so you can use the ACLI save-config and activate-config commands to enable it.

To set the daily local time at which the Oracle Communications Session Border Controller will clean up files:

  1. In Superuser mode, type configure terminal and press Enter.
    ORACLE# configure terminal
    ORACLE(configure)#
  2. Type system and press Enter.
    ORACLE(configure)# system
    ORACLE(system)#
  3. Type system-config and press Enter.
    ORACLE(system)# system-config
    ORACLE(system-config)#
  4. cleanup-time-of-day—Change this parameter from its default (00:00) to local time when you want the Oracle Communications Session Border Controller to begin the clean up process. You enter the time as HH:MM, where HH are the hours and MM are the minutes.
    ORACLE(system-config)# time-of-day 03:30

Cleanup Directories

To identify the directories the Oracle Communications Session Border Controller will clean up:

  1. Type directory-cleanup and press Enter.
    ORACLE(system-config)# directory-cleanup
    ORACLE(directory-cleanup)#
  2. directory-path—Enter the name of the directory path where you want the Oracle Communications Session Border Controller to perform file clean-up. Remember that subdirectories are not examined or cleaned. This parameter is required and is empty by default.
  3. admin-state—To turn on daily clean-up for the directory path you just specified in the directory-path parameter, leave this set to its default: enabled. If you want to turn of clean-up for the specified directory, set this parameter to disabled.
  4. age—Enter the age of the files to be deleted in number of days. For example, if you want the Oracle Communications Session Border Controller to clean all files that are three days old, you set this parameter to 3. Files older than this number of days will be purged. The default and maximum value is 30 (days), and the minimum value is 1 (day).
  5. Save and activate your configuration.