I’m running a Virtual Private Server where, every day at midnight, all files are backed up automatically by the VPS provider.
So I need to export the Solr index to a file, so that if something goes wrong someday, I’ll be able to import it back to Solr with ease.
How can I do this?
The Solr database IS a (or a couple of) file(s).
There is a folder that looks something like this:
HOWEVER: it would suffice to save this folder. you can as well just backup your entire solr isntallation using incremental rsync or whatever… once started again only caches would need to be filled up newly etc.
BUT: i hope solr is not your primary database? its meant to be a search engine and not a replacement for a database and not even a backup!
just like mysql replications are nice to do load balancing but are useless as a backup…
why? because with the same query you could end up with an empty index. its just the same with solr/lucene. … or for many, many other reasons that have far more brilliant people discussed already.
keeping that in mind i wish you a good day!