Friday, 11 January 2013

Backing up Alfresco


A fairly fool prof way of backup up the Alfresco server.

stop alfresco
sh /opt/alfresco-4.2.b/alfresco.sh stop

Change the global properties file

In /opt/alfresco-4.2.b/tomcat/shared/classes/alfresco-global.properties turn
### Solr indexing ###
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
solr.port.ssl=8443
into
### Solr indexing ###
index.subsystem.name=noindex
dir.keystore=${dir.root}/keystore
#solr.port.ssl=8443

Start and Stop the system


sh /opt/alfresco-4.2.b/alfresco.sh start && sleep 300 && sh /opt/alfresco-4.2.b/alfresco.sh stop

Dump the database structure
Start Alfresco postgresql:
 sh /opt/alfresco-4.2.b/alfresco.sh start postgresql
Dump (backup) the entire alfresco postgresql database to a script file (the postgres user password will be asked, use the one that you gave during the Alfresco installation):

 su postgres
$ pg_dump -h localhost alfresco > /home/philip/backup/alfrescodbdump
Password:
$ exit
Stop Alfresco postgresql:
sh /opt/alfresco-4.0.e/alfresco.sh stop postgresql

Backup the datastructure

cp /opt/alfresco-4.2.b /home/philip/backup/alfresco-4.2.b.backup -R

Revert the indexing back to on (Solr):

In /opt/alfresco-4.2.b/tomcat/shared/classes/alfresco-global.properties turn
### Solr indexing ###
index.subsystem.name=noindex
dir.keystore=${dir.root}/keystore
#solr.port.ssl=8443
into
### Solr indexing ###
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
solr.port.ssl=8443

Start  the system


sh /opt/alfresco-4.2.b/alfresco.sh start 

No comments:

Post a Comment