When creating a new Custom Report, Matomo will by default process the historical data for the newly created Custom Report for the last 6 months (This feature is only available since Matomo 4).

This setting can be changed in your config.ini.php.
For example to have Matomo automatically process Custom Reports for the last 12 months for new Custom Reports, you can add the following to the config.ini.php under the [General] section:

rearchive_reports_in_past_last_n_months = 12​​​

For Custom Reports that you wish to archive even further (For as far back as you'd like or as far back as you have RAW tracking data), you can achieve this without invalidating all of the Matomo reports.

This can be done by using the following Matomo console command (For example archiving all custom reports from June 2020 to today):

​​​​./console customreports:archive --date=2020-06-01,today

Additionally, we can add more parameters to the command to only archive specific ID Sites (For reports that may be available in all sites) or to archive only specific reports based on the Custom Report's ID:

./console customreports:archive --date=2020-06-01,today​ --idsites=X --idreport=Y

If you do need to invalidate report data for custom reports, you can use the following command to invalidate only the Custom Reports data:

./console core:invalidate-report-data --plugin=CustomReports --dates=2021-06-01,today --sites=X

Previous FAQ: Under what license is the Custom Reports tracker released?