Automatically obfuscate old activity data

It would be good to have an option to automatically delete/back up/encrypt/transform/run a script on raw data older than X days. This way, even if my machine gets compromised, not all data would be easily leaked.

The way I imagine this, at least on Linux:

  1. a cronjob that runs on machine startup, with a script that:
  2. SELECT queries the raw datastore for data that is created on or before (today-X) date, then
  3. transforms the data (for example, delete/backup on another drive/encrypt/etc.), and
  4. DELETE queries the raw datastore to delete that raw data from the original location

Is something like this possible in the current project? If not, can the developers give some guidance on how to implement the points 2 and 4? With their guidance, I would be happy to try and implement this feature.