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.
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.
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?
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.
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
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
...did you stop alfresco, Solr and DB (source side) before backing up?
Hi:
Do you have some hardlinks under alf_data ?
Regards.
--C.
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.
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?
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.