You could probably hack together some shell script...
# suitescript
m
You could probably hack together some shell scripts that do this, or if you are looking for a turn key solution, google "data warehousing"