the /var/ipfire/backup/addons/includes directory is intended for the backup lists for any installed addon to be stored. I can’t be certain that anything additional added in there will stay in place during an upgrade.
Yes, this is absolutely the correct place to list the files/directories that you want to be backed up. They will then be included as part of the overall IPFire backup.
/root/metrics/
will backup everything in the metrics directory including any subdirectories.
You can use wildcards to specify specific files in directories as well. /root/metrics/disk-space*
will save all files in that directory starting with disk-space.
You can also add multiple lines for that directory with different wildcards.
You could probably use standard regex commands but I don’t know that for certain and am not familiar enough with the backup perl code to know that without looking in some detail but you could give it a try and see if it worked.
A quick test already showed me that I’m correct and you of course, too. I had a further look into the backup Perl script /var/ipfire/backup/bin/backup.pl, too, that showed me that regular expressions may not apply since the script obviously reads line by line and backs up the given file or folder.
But I may be wrong in interpreting the perl script lines:
I looked through the tar manual and found a section on wildcards. So you can specify for instance that all files in a directory should be backed up except those that end in pa by adding the line in your example of /root/metrics/*[!p,a]
I tested this out and was able to filter out all files ending in pa but including all the other files, even if they had pa within the filename somewhere.