Hello,
To continue the evaluation of ACS, I tried to backup my server, build another one and restore the data (disaster recovery!). I looked in the procedures and did not find the exact commands to do. So I proceeded by trial and error and I finally go it. That is my process but maybe I'm missing something or I could do it better ?
The database is MYSQL. The root.dir is : /opt/alfresco/
Backup :
• sudo /opt/alfresco/ctlscript.sh stop • sudo tar -pczvf backup-alfresco-data.tar.gz /opt/alfresco/apps/alfresco/data • sudo tar -pczvf backup-alfresco-mysql.tar.gz /opt/alfresco/mysql/data • sudo tar -pczvf backup-alfresco-config.tar.gz /opt/alfresco/apache-tomcat/shared/classes • sudo /opt/alfresco/ctlscript.sh start
Copy the 3 files with SFTP to the second server (I use Bitvise SSH)
Restore :
• sudo /opt/alfresco/ctlscript.sh stop • sudo rm -r /opt/alfresco/apache-solr/server/solr/alfresco/index • sudo tar -xpzvf backup-alfresco-data.tar.gz -C / • sudo tar -xpzvf backup-alfresco-mysql.tar.gz -C / • sudo tar -xpzvf backup-alfresco-config.tar.gz -C / • sudo /opt/alfresco/ctlscript.sh start
You'll notice that I don't bother to backup and restore the Index and just reset them (it seems logical to reindex after a server crash,).
Also I could do a dumpSQL but that's more commands and the database is small in comparison with the data so I don't bother.
Of course, you must also change the IP adress of the ACS server in the DNS.
That's it, a good backup an a tested restore...
The best procedure is the one that works for you given the context of your environment (servers, people, and processes), so if it works for you, great.
I like to use MySQL dump, and I output the dump into the alf_data directory so that when I TAR up the alf_data directory, it has the appropriate MySQL data in it, all wrapped up in one TAR. You cannot really have a successful restore without both, so why risk the two files getting separated or mis-matched?
As for the config, I don't back it up because I always store all server config in source code control and distribute it to all the servers in my cluster and to each environment (e.g., DEV, TEST, PROD) with Ansible.
That way, whether it is a fresh install or a minor config change, it's always handled the same: Just run the Ansible playbook.
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.