Historian Modules Prune to File

I have the historian module installed and I've got monthly partitions set up with pruning set to one year. However, I am unsure when the data gets pruned and where it goes (if anywhere).

Does the data get pruned monthly since that's the partition size, and does the pruned data get dumped in a file somewhere? If not, is there a way I can set that up easily, or would it require manual scripting to export to a file before pruning happens (again, this would require me to know exactly when the pruning takes place)?

Every 10 minutes a check runs to see if any partitions should be dropped.

They are dropped - nothing more, nothing less. Pruning means "I don't care about this data anymore" to Ignition. If you want to try to configure a backup, I'd say to figure out a trigger or something on the DB side. Or, just turn off pruning.

So, if we want to archive the data turn off pruning on Ignition and handle it on the DB side. Got it.

And to be clear, it prunes an entire partition at once, correct? So every 10 minutes it does nothing until the next month's partition is created and now there's a partition that is older than 12 months?

From what I remember, it's basically a loop that runs every ten minutes:

  1. Look for partitions that belong to "me" (have my gateway name, in sqlth_drv)
  2. Check the pruning settings for the historian
  3. Check the age of the records in that partition (sqlth_partitions)
  4. Check the current date/time
  5. If the pruning settings say the table should go, it's dropped.