cancel
Showing results for 
Search instead for 
Did you mean: 

back up an restore alfresco-4.e

hombrezuelo
Champ in-the-making
Champ in-the-making
Hi brothers and sisters, I´m running Alfresco 4.2.e community edition (64 bits) on centos 6.4, everything was ok, but one week ago, I got a message "postgresql" can´t start. the I went to see my system logs and there´s no space available on root partition. I already change my data file on alfresco-global.properties from dir.root/opt/alfreco-4.2.e/alf_data to the new location. in that location I have more than 200GB, so i try to upload some files to my site, but I got a fail message. I have not time to reinstall. I wonder if is there a way to change everything to my other partition with 200GB the other one just is 10GB.

Thanks in advance.

3 REPLIES 3

hombrezuelo
Champ in-the-making
Champ in-the-making
Hi brothers and sisters, I was following this tutorial to back up and restore:

http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Fch-backup-r...

I made login on to my /share/page but there´s not any sites that I had created. Please if somebody can tell me if there´s something else to do for restore my files on mi sites´s library.

Thanks in advance.

Jah Love,

hombrezuelo
Champ in-the-making
Champ in-the-making
Hi, somebody can explain me this concept: in this tutorial:

http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Fch-backup-r...

"must be backed up as a single unit"

I didn´t get it what´s mean. Somebody can explain me what mean?

Thannks.

michaelc
Champ on-the-rise
Champ on-the-rise
What you need to do is cold backup, stop the server and then export the DB and the file content area. here is what I have for a mysql setup.
Your milage may vary
#!/bin/ksh
#################################################################
## **.sh                                 ###
##                                                            ###
##  Author     Version     Date      Description              ###
##  ======    =========   ======    =============             ###
##  mford       1.0      12/08/10    Created                  ###
##  mford       1.0      06/08/11    Create TAR               ###
##  mford       2.0      03/26/12    Revamp for the  **
################################################################
##  daily alfresco backup
##
##########################################

#####################################
## Migration steps:                ##
## 1. Stop the Alfresco Server     ##
## 2. Mysql dump of Alfresco Db    ##
## 4. Copy alf_data directory      ##
## 5. Restart server
#####################################
## Variables set up for platform  ###
## configuration                  ###
#####################################


#/root/.profile

##SCRIPT_DIR="/root"; export SCRIPT_DIR
##print "$SCRIPT_DIR"
LOGDIR="/root/log"; export LOGDIR

/bin/rm $LOGDIR/*
PREFIX="BACKUP"
DATE=`date +%m%d%y%H%M%S`
LOG="$LOGDIR/${PREFIX}_${DATE}.log"

ADMIN_MAIL_LIST="email@host.com"
SERVER="server name"
print "" > $LOG

#——————————————————-
# Echo output to stdout and to $LOG
#
# Input:  None
# Output: To stdout
# Return: None
#——————————————————-

function Print
{
  echo "$*"
  echo `date +"%D %T"`"| $*" >> $LOG
}

## Days to keep backup daily logs

DAYS=10

ERROR_FLG=0

Print
Print "Daily Backup of alfresco "
Print


# 1. Server stop

Print
Print "Shutting Down  alfresco server …."
Print

Print "Server Stop Log"
Print
#service alfresco stop
/opt/alfresco-4.2.c/alfresco.sh stop
Print
Print

if [ $? -gt 0 ]; then
Print " SERVER  Stop Failed: $? "
ERROR_FLG=1
else
Print "Server Stop Completed …."
fi

cd /opt/backup
/bin/rm -r *
/bin/mv /alfresco.log /opt/backup
/bin/mv /alfresco.log.* /opt/backup
/bin/mv /webquickstart.log /opt/backup
/bin/mv /webquickstart.log.* /opt/backup
/bin/mv /opt/alfresco-4.2.c/tomcat/logs/*.* /opt/backup
/bin/rm /opt/alfresco-4.2.c/tomcat/logs/*.log
/bin/rm /opt/alfresco-4.2.c/tomcat/logs/*.out

# 2. Database backup alfresco
Print
Print "Starting mysql alfresco dump …."
Print

mysqldump -u alfresco -p'*********' alfresco > alfresco.sql

if [ $? -gt 0 ]; then
Print " msqldump alfresco FAILED, error code: $? "
ERROR_FLG=1
else
Print "mysql Dump completed …."
fi
# 4. Copy data respository 
Print
Print "Copying alf_data files …."
# bin/cp -r /opt/alfresco-4.2.c/alf_data/ /opt/backup/
tar -cvf server.tar *
cd /opt/alfresco-4.2.c
tar -rvf /opt/backup/server.tar alf_data/
if [ $? -gt 0 ]; then
Print " cpy for alf_data files FAILED, error code: $? "
Print
ERROR_FLG=1
else
Print "Copying alf_data files Completed …."
Print
fi
# 5. Restart server  

Print "Starting alfresco server …."
Print "Server Start Log"
Print
#service alfresco start
/opt/alfresco-4.2.c/alfresco.sh start
Print

if [ $? -gt 0 ]; then
Print " Restart Server FAILED error code: $? "
Print
ERR OR_FLG=1
else
Print "Server Start Up Completed …."
Print
fi

MAIL_LIST=$ADMIN_MAIL_LIST
FREQUENCY="Daily"

if [ $ERROR_FLG -eq 0 ]; then
STATUS="Completed Successfully"
Print
Print "Alfresco Backup Completed Successfully …."
else
STATUS="FAILED!!!"
Print
Print "Alfresco Backup Failed ……"
fi

MAIL_SUBJECT="$SERVER: $FREQUENCY ALFRESCO Backup $STATUS $DATE_MM/$DATE_DD/$DATE_YYYY"
    mailx -s "$MAIL_SUBJECT" $ADMIN_MAIL_LIST < $LOG

## Removing logs over $DAYS old

find ${LOGDIR} -name "${PREFIX}*.log" -mtime +$DAYS -exec /bin/rm -f {} \; 2>&1 | Print

Print "Done."
exit 0