How to trim content from a heavy database I would like to trim content from a heavy production database (1GB), to reduce transfering time, local mysql import time and generally make it easier to work with.

I know I can ignore cache, watchdog and index tables and this reduces size greatly (about 50%) and I looked into deleting old node revisions.

But I'm looking further to, for example, remove all content older than 1 year, or all users that have not been active in the last 6 months. 

In the workflow these clean-up operations could be done in a (recently synched) staging environement before exporting the databse for local usage.

Anyone know how to accomplish removing older content from a database so it can be easier exported?
For content, I know two options, both based on Views:


Create a view of old content only, and use Views Bulk Operations to purge it from your site. This is literally what you asked for, but also something I would discourage.
Create a view of new content only, and use Views data export to only export nodes recent enough to matter. That way you will still have old content on site, and only lose it if site crashes and you need to restore from incomplete backup.


Also, I suggest you to evaluate Universally Unique IDentifier, it helps with consistency if you are exporting data individually, not as a complete snapshot of entire site.