larametrics
larametrics copied to clipboard
Archive data to S3 after WatchedExpireDays
Adding a feature to archive data from db to S3 (requests/metrics/logs/model...) or to other external endpoint after defined *WatchedExpireDays would greatly meet the audit compliance, instead of deleting from database.
@bishalkc any suggestion in how we should do that? Pretty sure it removes 1 at a time. Should it send 1 at a time? And how would the data be formatted? Json? CSV?
If we're gonna go the distance to make an export, we would probably want to use the Filesystem setup from Laravel.
@nowendwell I need to check if it 1 at a time, if so likely push 1 at a time with date and/or record id appended to filename, i think it may be great if we have an option to archive as json or csv (but prefer json), for me both works, but just thinking out loud other folks may prefer one or other.
@bishalkc I was mistaken. It does a lookup for all of the records older than the config date and then deletes them. It would be pretty easy to export these especially since it is based on a model we can call toArray or something similar.