Hello everybody,
I started testing alfresco with version 3.3 (community version) and I like this software. I'm a just a very early beginner that's why I wanted to test a full backup / restore of the database before going further.
I've read a lot on this forum and in the different web sites I found and it looks so easy that I feel stupid not to succeed in.
Here is 3 different trials I've made and their results with related questions.
Many thanks in advance to whom can answer some of them (all ??).
For those who will ask: yes I've read and re read the alfresco wiki to how to backup and restore…
TEST1:
with version community 3.3 on xubuntu 10.04
(install following a howtoforge how to)
COLD BACKUP:
- stopping alfresco (with ./alfresco.sh stop)
- copying alf_data directory
- dumping database (mysqldump -ualfresco -palfresco alfresco > backup.sql)
- starting alfresco
RESTORE:
- stopping alfresco (with ./alfresco.sh stop)
- deleting alf_data directory
- copying alf_data backup directory in place
- dumping back database (mysqldump -ualfresco -palfresco alfresco < backup.sql)
- starting alfresco
RESULT:
- the content is correct but the database is in the exact state of last version. Indeed I can see on alfresco GUI some elements I deleted but I'm not able to access them as the .bin have disappeared
QUESTION:
- How can I check that the mysql database backup is correct ? or the restore backup procedure has succeeded ?
TEST2:
with version community 3.3 on xubuntu 10.04
COLD BACKUP:
- stopping alfresco (with ./alfresco.sh stop)
- copying alf_data directory
- dumping database (mysqldump -ualfresco -palfresco alfresco > backup.sql)
- starting alfresco
RESTORE:
- stopping alfresco (with ./alfresco.sh stop)
- deleting alf_data directory
- copying alf_data backup directory
- deleting alfresco database with sql script including (db_remove.sql and db_setup.sql)
- dumping database (mysqldump -ualfresco -palfresco alfresco < backup.sql)
- starting alfresco
RESULT:
- Tomcat starts but not the database, I got a 404 error with content not available on the alfresco web page
QUESTION:
- As I found several occurences of this method (db remove and setup) on the net can someone confirms it is necessary or not to use it ? if yes, what's wrong with my procedure ?
TEST3:
I upgraded to community 3.4b on xubuntu 10.04 (i386) to check any behaviour differences…
(using alfresco installer with all standard options)
With this version, when stopping alfresco with the script it also stops tomcat and mysql. So I'm unable to dump mysql database….I tried to start only mysql with the script included "ctl.sh " but mysql refuses to start.
As I just can't backup my database, I finally decided to try (wihtout any hope ..) a full backup of the alfresco installation directory inluding alf_data and the mysql data directory. As the dabase server and tomcat was stopped I thought it could work as no database update can be done during the copy process.
COLD BACKUP:
- stopping alfresco (with ./alfresco.sh stop)
- copying /opt/alfresco directory
- starting alfresco
RESTORE:
- stopping alfresco (with ./alfresco.sh stop)
- copying backup directory to /opt/alfresco
- starting alfresco
RESULT:
- Tomcat starts but not the database. The mysql starting script failed trying to launch a test.pid (perhaps corresponding to a database entry "test" workspace I created and then deleted for the test ?)
QUESTION:
- Can someone explains why a raw copy of the alfresco directory fails ? With databases stopped I just can't undertand that.
- Is there a chance a raw copy can work ie did I do it wrong or is it purely impossible
- How is backups supposed to be done with version 3.4 as it seems impossible to dump the database (or how can I do ?)
Sorry for so many questions (perhaps some of them really idiot ?) but I'm reallly lost with the backup / restore procedure …
Please help !!!
PS: this is my first post here so don't hesitate to tell me if anything is not correct