01-25-2018 09:00 PM
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.
01-26-2018 04:09 AM
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
Regards.
--C.
01-26-2018 05:53 AM
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?
01-26-2018 08:16 AM
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.
01-26-2018 08:38 AM
...did you stop alfresco, Solr and DB (source side) before backing up?
01-26-2018 08:47 AM
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.
01-26-2018 08:43 AM
Hi:
Do you have some hardlinks under alf_data ?
Regards.
--C.
01-26-2018 08:18 AM
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
01-26-2018 08:22 AM
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
01-26-2018 09:15 AM
Just a dumb question (yes, I have seen rsync -a 😞 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?
Explore our Alfresco products with the links below. Use labels to filter content by product module.