Hi, I've been working with the snapshot / replication scripts recently, and I believe you could use / alter them to do what you want.
On Fri, Jun 27, 2008 at 03:49:49PM +0530, Jacob Singh wrote: > Hi, > > I see this has been discussed: > http://www.mail-archive.com/solr-user@lucene.apache.org/msg08150.html > > and I've read the wiki. > > I've got replication working okay, but I'm not trying to do replication. > Rather, I want to: > > 1. Get a hot backup of a master server (meaning no interruption of service). This is essentially what you get with the snapshooter script that you probably have being triggered as a postCommit in your solrconfig.xml if you are doing the replication. <!-- A postCommit event is fired after every commit or optimize command --> <listener event="postCommit" class="solr.RunExecutableListener"> <str name="exe">solr/bin/snapshooter</str> <str name="dir">.</str> <bool name="wait">true</bool> </listener> After looking at the 'abc' script it appears that so long as you have the post commit hook in, you can just invoke 'abc' and it: 1) sends a 'commit' message to solr 2) waits for the newly created snapshot dir to appear 3) makes a backup of the snapshot dir using hardlinks. > 2. rsync that backup somewhere Use the snappuller script, or alter to suit on the backup server to pull the directory created with 'abc' to the backup server. > 3. Shut down the server I don't think you need to. > 4. rsync the backup back to the master server Use the snappuller script on the master, or alter it to suit to pull the backed up directory from the back server to the master. > 5. start the master server with my index intact. Use the snapinstaller script or alter it to suit to do the directory renaming and then tell solr to use the new index. > The issue I am having is that everytime I start it, it seems to have a > new naming scheme for the index files. So one time it is _s..., next it > is _q..., and then _0... Those would be the individual files inside the lucene index, The "index" you want to backup is the entire 'solr/data/index' directory. I imagine you want to think of that directory as an atomic unit, the whole directory at once describes your index, not the individual files in it. > If this didn't change I don't think it would be an issue. I see there > are scripts for backup (abc, backup, abo, etc), but I don't understand > how I can restore to my master server. Those names will change every time an 'optimize' command is run. Someone with more knowledge than I can probably go futher, but this is what I think you could do with what I know about solr at this point. enjoy, -jeremy -- ======================================================================== Jeremy Hinegardner [EMAIL PROTECTED]