On-demand cleanup using profiles

Prev Next

You can analyze disk space used by system files, such as backups, dumps, reports, log files, and some types of artifacts. Disk management profiles are defined for groups of system file types, and you can delete data using these profiles to free disk space.

Some data, such as configuration data, cannot be deleted.

You can use the following profiles for disk management:

Profile

Description

backups

Backup files created during user-initiated backup and restore procedures.

fedb-backups

Database backup files created during system image updates

logs

Log files

malicious-artifacts

Malicious artifact files generated on the appliance

nonmalicious-artifacts

Nonmalicious artifact files generated on the appliance

reports

Report files

smartvision

SmartVision context files

snapshots

System snapshots

sysdumps

System dumps

tcpdumps

TCP capture files

temp-files

Temporary files

For more information, see:

Viewing a summary of disk space use using the CLI

You can view a summary of disk space use for the /config, /var, and /data file systems and the associated profiles. You should run this command to analyze disk space use.

Note

You cannot delete files from the /config file system. Space information for this file system is for information purposes only.

To view a summary of disk space use:
  1. Go to CLI configuration mode:

    hostname > enable
    hostname # configure terminal
  2. Show the current disk space use summary:

     hostname (config) # show system cleanup summary
Statistics for /config filesystem:
Space Total          182 MB
Space Used             7 MB
Space Free           175 MB
Space Available      166 MB
Space Percent Free   96%
Inodes Percent Free  99%

Statistics for /var filesystem:
Space Total          20031 MB
Space Used            2682 MB
Space Free           17348 MB
Space Available      16324 MB
Space Percent Free   86%
Inodes Percent Free  99%

Statistics for /data filesystem:
Space Total          1068532 MB
Space Used           126189 MB
Space Free           942343 MB
Space Available      888058 MB
Space Percent Free   88%
Inodes Percent Free  99%
						
Statistics for /data/db filesystem:
Space Total          125863 MB
Space Used           958 MB
Space Free           124905 MB
Space Available      118489 MB
Space Percent Free   99%
Inodes Percent Free  99%

Profile Name           | Description                     | Occupied Space | Cleanable Space | Filesystems
====================== | ================================|===============================================
backups                | Unified Backups                 |           0 MB |            0 MB | /data
fedb-backups           | FEDB Backups                    |        6446 MB |         6446 MB | /data
logs                   | Application log files           |         427 MB |          411 MB | /var
malicious-artifacts    | Malicious Malware Artifacts     |           0 MB |            0 MB | /data
nonmalicious-artifacts | Non-malicious Malware Artifacts |           0 MB |            0 MB | /data
reports                | Reports                         |           1 MB |            1 MB | /data
snapshots              | System snapshots                |           8 MB |            5 MB | /data
sysdumps               | System dumps                    |           0 MB |            0 MB | /data
tcpdumps               | TCP capture files               |           0 MB |            0 MB | /var
temp-files             | Temporary files                 |           0 MB |            0 MB | /var
Viewing disk space use by profile using the CLI

You can view disk space use by profile. You should run this command to determine the best data to delete for a specific profile.

To view a summary of disk space use by profile:
  1. Go to CLI configuration mode:

    hostname > enable
    hostname # configure terminal
  2. Show the current disk space use for a profile:

    hostname (config) # show system cleanup profile [backups | fedb-backups | logs | malicious-artifacts | nonmalicious-artifacts | reports | smartvision | snapshots | sysdumps | tcpdumps | temp-files]

    For profile descriptions, see On-Demand Cleanup Using Profiles .

    For example, the following shows the disk space use for the logs profile:

     hostname (config) # show system cleanup profile logs
    Older than  | Size
    ============|=============
     365 days   |         0 MB
     180 days   |        25 MB
      90 days   |       212 MB
      30 days   |       342 MB
       7 days   |       382 MB
       1 day    |       405 MB
        All     |       411 MB
Deleting data to free disk space using the CLI

After you have analyzed the disk space use, you can delete data to free the disk space you need.

To delete data to free disk space:
  1. Go to CLI configuration mode:

    hostname > enable
    hostname # configure terminal
  2. Delete data:

    hostname (config) # system cleanup profile {backups | fedb-backups | logs | malicious-artifacts | nonmalicious-artifacts | reports | smartvision | snapshots | sysdumps | tcpdumps | temp-files} {all | older-than <no. of days>} [force]

    where:

    • all deletes all data that can be deleted for this profile

    • older-than <no. of days> deletes data that is older than the specified number of days

    • force deletes the data as requested without prompting for confirmation

    If you do not use the force option, the command prompts for confirmation.

    For example, the following deletes data that matches the logs profile. It deletes only data that can be deleted that is older than 180 days.

    hostname (config) # system cleanup profile logs older-than 180
    This will remove cleanable files older than 180 days for the profile 'logs'. Do you want to continue? [y/n]: y
    25 MB of disk space freed.