No Index after Backup and Restore

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

No Index after Backup and Restore

I set up a development server to experiment with Alfresco Community Edition.  Everything seems to be working well so I have begun experimenting with being able to backup and restore the system to another machine.  This seems to work well with one exception, the files are not indexed after being restored.  I can post the script I have created to backup and restore my system if that would be of help.  I look forward to hearing any advise anyone can provide.  Thank you in advance.

15 Replies
Highlighted
Customer

Re: No Index after Backup and Restore

Hi:

Depending on how you do backups, you should have a copy of the current SOLR indices, or at least you will be able to recover the daily backups of SOLR from $ALF_HOME/alf_data/solr4Backup

Check the following links for more information (some scripts and backup strategies are commented there):

Alfresco Backup and Disaster Recovery White Paper 

GitHub - toniblyx/alfrescodevcon2018: Slide deck for my talk about Alfresco Backup and DR (and HA ar... 

Regards.

--C.

Highlighted
Senior Member II

Re: No Index after Backup and Restore

Do you mean that all files aren't indexed (no index/search at all) or only files created after the restore? Are you running on Linux or Windows?

Highlighted
Member II

Re: No Index after Backup and Restore

After the backup is complete the files are all restored properly except that the search features fails to find any files on the system that match the search criteria.  New files added to the system after the restore are searchable but not the old files that have been restored.  Also, I just found out this morning that if I move the restored files from one folder to another they become searchable.  I'm going to post the backup and restore instructions I have created for myself.

Highlighted
Member II

Re: No Index after Backup and Restore

Here is the backup instruction I have created for myself:

Stop the Alfresco Community Edition server

cd /opt/alfresco-community/      sudo ./alfresco.sh stop

Export the database to alf_data

sudo ./alfresco.sh start postgresql
sudo su
postgresql/bin/pg_dump -U alfresco -F t -b alfresco > alf_data/postgres.dump.tar
exit
sudo ./alfresco.sh stop

Copy the configuration directory to alf_data

sudo cp -r tomcat/shared/classes/alfresco/extension alf_data

Back up alf_data

sudo rsync -a alf_data/ /path/to/backup/directory

Start the Alfresco Community Edition server

sudo ./alfresco.sh start

Highlighted
Member II

Re: No Index after Backup and Restore

And here are the restore instruction I have written for myself:
Install a compatible Alfresco Community Edition server and make sure the new server is not running.

cd /opt/alfresco-community/

sudo ./alfresco.sh stop

Restore the archive to alf_data

sudo rsync -a /path/to/backup/directory/ alf_data/

Restore the configuration directory

sudo cp -r alf_data/extension tomcat/shared/classes/alfresco

Restore the database

sudo ./alfresco.sh start postgresql
sudo su - postgres
/opt/alfresco-community/postgresql/bin/psql
drop database alfresco;
create database alfresco with owner alfresco;
\q
/opt/alfresco-community/postgresql/bin/pg_restore -d alfresco < /opt/alfresco-community/alf_data/postgres.dump.tar
exit

Start the Alfresco Community Edition server

sudo ./alfresco.sh start

Highlighted
Senior Member II

Re: No Index after Backup and Restore

...did you stop alfresco, Solr and DB (source side) before backing up?

Highlighted
Customer

Re: No Index after Backup and Restore

Hi:

Do you have some hardlinks under alf_data ? 

Regards.

--C.

Highlighted
Senior Member II

Re: No Index after Backup and Restore

if not, and it's no problem to reindex all data: stop your "clone", delete the index data dirs () under ...alf_data/solr4/index

or remove the index data und copy/move a snapshot form ...alf_data/solr4Backup to your index data dirs.

As in: Restoring Solr 4 indexes | Alfresco Documentation 

Highlighted
Senior Member II

Re: No Index after Backup and Restore

Just a dumb question (yes, I have seen rsync -a  Smiley Happy ): after restoring to the new machine. Is the alfresco user the same as on the source instance (name, UID, GID)? Ownership and accessrights are ok?