cancel
Showing results for 
Search instead for 
Did you mean: 

How to backup Solr on Alfresco CE 5.2

mzpari
Champ in-the-making
Champ in-the-making

Hi,

after some testing, we're currently setting up our Alfresco environment and writing backup scripts. I know that the Solr indexes are backed up automatically and that we can change that schedule. But in from our experience backups are much more reliable, when you're able to make a fresh backup from something, before saving it in a backup repository.

According to the official documentation for the community edition this is acomplishable by using JMX:

Refreshing the backup Solr indexes (optional) | Alfresco Documentation 

This is an optional step before initiating a hot backup.

  1. Trigger a Solr index backup using a JMX client.

    JConsole (MBeans tab -gt Alfresco/Schedule/DEFAULT/MonitoredCronTrigger/indexBackupTrigger/Operations - executeNow button)

  2. After completing this operation, the solr4Backup directory contains an up-to-date cold copy of the Solr indexes, ready to be backed up.

We actually managed to attach with jmxterm locally, but couldn't find a fitting MBean. Then after days of searching we found this question:Unable to connect with JConsole 

And in the answer section we did read this:

JMX has always been an Alfresco Enterprise feature.    But on Community you could still access tomcat's JMX features.

With the EOL of the RMI services in 5.0.  Community no longer binds a RMI registry to port 50500

You can still access Tomcat's JMX features but not via Alfresco's connection.   See Tomcat's docs for further details.

I must say, it is a bit disturbing that the official documentation refers to a feature, which is no longer supported.

Since that was the only documented way to make a fresh backup of the Solr indexes, how can I backup them without it?

1 ACCEPTED ANSWER

cesarista
World-Class Innovator
World-Class Innovator

Yes, JMX is an enterprise feature, so you can not run this in Community version

I remember that in SOLR 1.4, I used some replication API to trigger directly a backup, so you probably will find a similar service in SOLR 4 or SOLR 6. And this can be done via curl with a client certificate via SOLR API :

Running the Alfresco Solr backup from the command line – : : blyx.com : : Blog : : Toni de la Fuente... 

Regards.

--C.

View answer in original post

2 REPLIES 2

cesarista
World-Class Innovator
World-Class Innovator

Yes, JMX is an enterprise feature, so you can not run this in Community version

I remember that in SOLR 1.4, I used some replication API to trigger directly a backup, so you probably will find a similar service in SOLR 4 or SOLR 6. And this can be done via curl with a client certificate via SOLR API :

Running the Alfresco Solr backup from the command line – : : blyx.com : : Blog : : Toni de la Fuente... 

Regards.

--C.

mzpari
Champ in-the-making
Champ in-the-making

Thank you, that helped a lot. I hope that will be added to the manual for the community edition, since the described way in it is not working with the community edition.

Hint for others: Replace "solr" with "solr4" in the URL fpr the current versions of alfresco and replace "alfresco" with "alfresco-community" in the file path if you're using the default installation directory.