cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable Solr Backup

joe_l3
Confirmed Champ
Confirmed Champ

Hi all,

is there someone who has totally disabled the solr Backup scheduler in Alfresco Community?

I tried to set the "numberToKeep" properties to 0 for both archive and alfresco stores but it doesn't work. The cron trigger start anyway and a backup is performed…
I use Alfresco Community 4.2.f with the following configurations in the alfresco-global.properties:


### Start backup every 1 minute
solr.backup.alfresco.cronExpression=0 0/1 * * * ?
solr.backup.archive.cronExpression=0 0/1 * * * ?

### The backup directory
solr.backup.alfresco.remoteBackupLocation=${dir.root}/solrBackup/alfresco
solr.backup.archive.remoteBackupLocation=${dir.root}/solrBackup/archive

### Trying to disable backup using 0 retention
solr.backup.alfresco.numberToKeep=0
solr.backup.archive.numberToKeep=0
‍‍‍‍‍‍‍‍‍‍‍‍‍



Actually, a (not recommended) workaround is to comment the two cron triggers bean's definition in webapps/alfresco/WEB-INF/classes/alfresco/subsystems/Search/solr/solr-backup-context.xml


<bean id="search.alfrescoCoreBackupTrigger" class="org.alfresco.util.CronTriggerBean">
<!– blablabla –>
</bean>
<!– blablabla –>
     <bean id="search.archiveCoreBackupTrigger" class="org.alfresco.util.CronTriggerBean">
<!– blablabla –>
</bean>
‍‍‍‍‍‍‍‍‍



However this is not a good practice because I have to touch a  spring context of exploded alfresco  in the Tomcat webapps directory.
Is there any suggestion?

2 REPLIES 2

romschn
Star Collaborator
Star Collaborator
If you want to never run the specific scheduler then you should set the cron expression for the scheduler as mentioned here in quotes "* * * * * ? 2099". This will never run the scheduler.

Hope this helps.

joe_l3
Confirmed Champ
Confirmed Champ
Putting a far value in the future doesn't totally disable the scheduler but postpone it…

I was looking for a good and supported solution to totally disable the scheduler.