CLOS persistence

I've got some classes, with millions of instances. So much that it is
easy to get running out of memory.
My simple question is:

Is there any way to manage all of this clases through a database? I'm
not saying just persist them, but also getting them out of memory so
I can work from the database when needed?
I don't want to reimplement all of the program, I'm looking for a
solution like MOP or something like that.

Any help?