Commander Database Maintenance

In large, busy environments, it can be useful to purge historical data from the Commander database to minimize database size and maintain Commander performance.

In a new Commander installation, a default Purge Historical Data task runs weekly, purging events and tasks older than a year. See Schedule Historical Data purges below to learn how to disable or edit this task.

You can also purge historical data when your want, you can also select the types of data to purge and specify the age at which data purge is triggered. You can also create multiple tasks if you need to purge different types of data on different schedules.

Important considerations before purging data

Caution: Data that's purged from the Commander database is permanently deleted.

Best Practice: If you want to delete billing records, ensure that you always back up your database before performing a purge. You may also want to generate a VM Billing Report before purging billing records.

Best Practice: It's also recommended that you use a monitoring solution to make sure you don't run out of disk space unexpectedly.

Manually purge historical data

Tip: Commander performance may be impacted while the data purge task is running. Consider running the purge during a time when the system isn't busy (at the end of the wizard, you can choose to run the purge later).

Access through:

Configuration > System

Available to:

Commander Role of Superuser

  1. Click the Maintenance tab.
  2. On the Maintenance page, click Start Wizard.
  3. In the Purge Data wizard, on the Choose Data Type page, select one or more of the following data types:
    • Alerts — Messages generated by Commander when an event or task that has been started requires attention. Alerts are sent out by Commander when a policy has been triggered.
    • Events — Records of activity that have occurred in your virtualized infrastructure. You can see all events that have taken place through the information panel accessed through the historical Events tab.
    • Historical Reporting Data — Events generated before the cloud account was added to Commander; used to produce reports.
    • Tasks — User-initiated actions that appears under the Tasks tab.
    • VM Performance Data — Data that Commander displays on the Performance tab for a VM. If you purge this data, performance data for the VMs in your virtualized infrastructure will be set to "unknown" for the relevant dates. For more information, see Monitor Performance of VMs, Hosts, Clusters
    • Billing Records — Records of current VM costs, generated nightly from values entered in cost models. Billing records are also generated automatically for retrieved historical events. Billing records form the basis for reports such as the VM Billing report and the Cloud Migration Planner report. For more information, see Configuring Cost Models.
  4. To specify the age at which data purge is triggered, select values from the Purge all data older than menus.
  5. Click Next.
  6. On the Perform Maintenance page, review the summary information, then to purge the data immediately, select Confirm purge and click Purge Now.

    Tip: From this page, you can also select Schedule, which will redirect you to the Purge Historical Data page of the Configure Scheduled Task dialog. For information on how to proceed with this selection, seeSchedule Historical Data purges.

Schedule Historical Data purges

Commander allows you to schedule a regular automatic data purge task. You select the types of data to purge and specify the age at which data purge is triggered.

Caution: See Important considerations before purging data before starting a data purge.

Tip: Commander performance may be impacted while the data purge task is running. Consider running the purge during a time when the system isn't busy (at the end of the wizard, you can choose to run the purge later).

Access through:

Tools > Scheduled Tasks

Available to:

Superuser

  1. On the Scheduled Tasks page, click Add.
  2. In the Configure Scheduled Task wizard, select Purge Historical Data, then click Next.
  3. On the Purge Historical Data page, provide a name for the purge task.

    Note: This name can't be edited later.

  4. Select one or more of the following data types:
    • Alerts — Messages generated by Commander when an event or task that has been started requires attention. Alerts are sent out by Commander when a policy has been triggered.
    • Events — Records of activity that have occurred in your virtualized infrastructure. You can see all events that have taken place through the information panel accessed through the historical Events tab.
    • Historical Reporting Data — Events generated before the cloud account was added to Commander; used to produce reports.
    • Tasks — User-initiated actions that appears under the Tasks tab.
    • VM Performance Data — Data that Commander displays on the Performance tab for a VM. If you purge this data, performance data for the VMs in your virtualized infrastructure will be set to "unknown" for the relevant dates. For more information, see Monitor Performance of VMs, Hosts, Clusters
    • Billing Records — Records of current VM costs, generated nightly from values entered in cost models. Billing records are also generated automatically for retrieved historical events. Billing records form the basis for reports such as the VM Billing report and the Cloud Migration Planner report. For more information, see Configuring Cost Models.
  5. From Purge all data older than, specify the age at which data purge is triggered.

    Note: You can specify only one age trigger per scheduled task. To specify different ages for different data types, create multiple scheduled tasks.

  6. On the Scheduling page, select the frequency at which you want the task occur then specify the recurrence values for the chosen frequency:
    • Once — The task will occur only once on a specified time and day, then the task will be removed from the Scheduled Tasks list after it has been run. In the Recurrence area, select a time of day and date for the task to occur.
    • Daily — The task will occur each day of the week.
    • Weekly — The task will occur for the selected days of the week.
    • Weekdays — The task will occur daily Monday-Friday.
    • Monthly — The task will only occur one day a month.
    • Week Day of Month — The task will occur for the chosen days of just one month each week.

      Note: If you select 31 for Day of Month for a monthly frequency, Commander automatically adjusts the day to reflect the last day of any given month. The same adjustment is made if you select 29 or 30 for February.

  7. On the Summary page, review the details and click Finish.

    The scheduled task appears in the list of scheduled tasks.

Configure the Database Maintenance task schedule

If you upgraded Commander, a database maintenance scheduled task is scheduled to run once on the Saturday following the upgrade, at 2:00 a.m. This task creates database indexes which speed up cloud account reconnection and Commander service restart. Once the scheduled task has run successfully, the scheduled task is automatically deleted. It's not possible to delete this task manually. You can change the time when this scheduled task runs.

This scheduled task doesn't exist in a fresh installation of Commander because the indexes are created during installation.

Tip: Commander performance may be impacted while the data purge task is running. Consider running the purge during a time when the system isn't busy (at the end of the wizard, you can choose to run the purge later).

Access through:

Tools > Scheduled Tasks

Available to:

All Access Rights Levels

Superuser and Enterprise Admin can Disable or Override Schedule

To edit the schedule for the database maintenance task:

  1. On the Scheduled Tasks page, select the Database Maintenance task type and click Edit.
  2. In the Configure Scheduled Task dialog, change the schedule, then click Next.
  3. On the Summary page, click Finish.