Capacity Extension

The capacity extension checks the current capacity of the media in the writer and prints a warning if the media exceeds an indicated capacity. The capacity is indicated either by a maximum percentage utilized or by a minimum number of bytes that must remain unused.

This action can be run at any time, but is probably best run as the last action on any given day, so you get as much notice as possible that your media is full and needs to be replaced.

To enable this extension, add the following section to the Cedar Backup configuration file:

<extensions> <action>
      <name>capacity</name>
      <module>CedarBackup2.extend.capacity</module>
      <function>executeAction</function>
      <index>299</index>
   </action>
</extensions>
      

This extension relies on the options and store configuration sections in the standard Cedar Backup configuration file, and then also requires its own capacity configuration section. This is an example Capacity configuration section that configures the extension to warn if the media is more than 95.5% full:

<capacity>
   <max_percentage>95.5</max_percentage>
</capacity>
      

This example configures the extension to warn if the media has fewer than 16 MB free:

<capacity>
   <min_bytes>16 MB</min_bytes>
</capacity>
      

The following elements are part of the Capacity configuration section:

max_percentage

Maximum percentage of the media that may be utilized.

You must provide either this value or the min_bytes value.

Restrictions: Must be a floating point number between 0.0 and 100.0

min_bytes

Minimum number of free bytes that must be available.

You can enter this value in two different forms. It can either be a simple number, in which case the value is assumed to be in bytes; or it can be a number followed by a unit (KB, MB, GB).

Valid examples are 10240, 250 MB or 1.1 GB.

You must provide either this value or the max_percentage value.

Restrictions: Must be a byte quantity as described above.