cancel
Showing results for 
Search instead for 
Did you mean: 

solrBackup directory in my alf_data

bisana
Champ on-the-rise
Champ on-the-rise
Hi
I am using CE 4.2.c, and some time, I have observed that in my alf_data there is a directory solrBackup created. I have not created it manually.
I remove it and may after few days when i check I see it again.
Why the solrBackup directory is being created. Any process or action is creating it
does the default alfresco installation has this option of creation of solrBackup automatically
Guidance and advice requested
thanks
2 REPLIES 2

joe_l3
Confirmed Champ
Confirmed Champ
Hi,
solrBackup is the default directory position for automated backup copy of solr indexes.
In Alfresco 4.1 you can find 2 properties in WEB-INF/classes/alfresco/subsystems/Search/solr/solr-backup.properties

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


In the Enterpise version you can set these properties accessing Share

In the  Community version you can set alfresco-global.properties

# the backup path
solr.backup.alfresco.remoteBackupLocation=${dir.root}/solrBackup/alfresco
solr.backup.archive.remoteBackupLocation=${dir.root}/solrBackup/archive
# the number of backups to keep
solr.backup.alfresco.numberToKeep=3
solr.backup.archive.numberToKeep=3
# the backup scheduler
solr.backup.alfresco.cronExpression=0 0 2 * * ?
solr.backup.archive.cronExpression=0 0 4 * * ?

ainsof
Confirmed Champ
Confirmed Champ

Putting this here in case someone was trying to find what I was after.

--

If you want to restore solr4 indexes from solr4Backup folder follow these steps
(works for Alfresco Community 5.2 on centos 7 64 bit)

1. stop solr / tomcat

sudo service alfresco stop tomcat

2. delete current indexes usually stored in {alf_data}/solr4/index. check 'data.dir.root' setting in alfresco-global.properties

cd /opt/alfresco-community/alf_data/solr4

sudo rm -rf index/workspace/SpacesStore/index/*

sudo rm -rf index/archive/SpacesStore/index/*

3. restore backups from solr4Backup folder. usually stored {alf_data}/solr4Backup

cd /opt/alfresco-community/alf_data/solr4Backup

sudo cp -R alfresco/{some snap shot}/* ../solr4/index/workspace/SpacesStore/index/

sudo cp -R archive/{some snap shot}/* ../solr4/index/archive/SpacesStore/index/

4. start solr / tomcat

sudo service alfresco start tomcat

more info

Solr directory structure | Alfresco Documentation 

Performing a full reindex with Solr | Alfresco Documentation 

Performing a hot backup | Alfresco Documentation 

Restoring Solr indexes | Alfresco Documentation