cancel
Showing results for 
Search instead for 
Did you mean: 

Backup options

andy_ukgrid
Champ in-the-making
Champ in-the-making
Hi,

  Im completely new to Alfresco, I've been looking on the wiki site for information on backup and restore. I'm trying to work out how you would restore a single file if it was accidentally removed but I can only find very basic backup and restore information regarding doing a full backup and full restore. Can anyone give me any info regarding per file restores?

thanks a lot, Andy.
11 REPLIES 11

dmatejka
Champ in-the-making
Champ in-the-making
Hi
in the User profile you have a "manage deleted items" link. there you can recover what you have erased. I m not sure if this feature was in the 2.1 version of alfresco. Im running 2.9C.

hope it helps

jpfi
Champ in-the-making
Champ in-the-making
Hi,
do you want to restore in file of the alfresco system (http://wiki.alfresco.com/wiki/Backup_and_Restore) or a file inside of the alfresco repository as daniel mentioned before?
Cheers, Jan

andy_ukgrid
Champ in-the-making
Champ in-the-making
Hi,

  well I want to understand all typical backup/restore situations for Alfresco. So firstly yes thanks, the part about managing deleted files is what I was after.

Beyond that, if for example I have completely deleted a file do I have to do a full system recovery to another server to recover a file?

And with regards the info http://wiki.alfresco.com/wiki/Backup_and_Restore the example is for an interactive backup via an export. What can you use to perform a regular scheduled backup? And what needs to be backed up other than the database? From what I understand only metadata is stored in the database and files are stored in the filesystem…

thanks for your help! Andy.

andy_ukgrid
Champ in-the-making
Champ in-the-making
Anyone? Id really like to know how people are doing scheduled backups of the whole server, doing an export is obviously not a real option Smiley Frustrated  How are people automating full Alfresco backups and achieving a good consistent backup of both DB and file data? Basic stuff isnt it?! Smiley Frustrated

thanks! Andy.

dmatejka
Champ in-the-making
Champ in-the-making
Hi,
Im only a business user. But our admin has answered like this:
1. stop alfresco
2. mysqldump -u alfresco -p alfresco > /opt/alfresco/alf_data/db_dump
3. tar cfz alf_data.tar.gz /opt/alfresco/alf_data/
4. start alfresco

this job is simple bash script running at 03:00am from cron

that's all ..

hope it helps

andy_ukgrid
Champ in-the-making
Champ in-the-making
Hi,

  ok, yes thanks for the information. I guessed it would be this way, not so great that the server needs to be stopped tho Smiley Sad

thanks! Andy.

dmatejka
Champ in-the-making
Champ in-the-making
I think there is a solution when you run cluster of two alfresco instances.. you can stop one that is as a "slave" a do a backup then sync the cluster.

however this topic is too technical for me.. maybe somebody else is going to give you a hint..

vibhutewary
Champ in-the-making
Champ in-the-making
Hi,
I'm trying to schedule Alfresco to start and stop using crontab for the backup purpose.

Unfortunately when i run the alfresco.sh start script from cron, it does'nt start alfresco. However alfresco starts from the command prompt.

I have done a lot of study on the matter but have not been able o make the script run using crontab, while other commands run on it. (I also set the dir.root to an absolute path of /opt/alfresco/alf_data)

Also, if i have another line, like "env > /opt/env.log" it works fine for the moment it is set to run at. However, the line below for starting Alfresco does'nt do anything. Can this be a permissions problem? I have already tried the SHELL, PATH on /etc/crontab file but to no vail. Has anyone scripted this using crontab to automate the backup process (stop, backup db, backup alfresco, start) ?

Help appreciated,

Regards,
Vibhu.

vibhutewary
Champ in-the-making
Champ in-the-making
I'm using this script in crontab:

SHELL=/bin/bash
PATH=/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/alfresco/bin:/root/bin

43 * * * *   env > /opt/cronlog.log
43 * * * *   /opt/alfresco/tomcat/bin/startup.sh

and the output for cronlog.log file generated above is:

SHELL=/bin/bash
USER=root
PATH=/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/alfresco/bin:/root/bin
PWD=/root
SHLVL=1
HOME=/root
LOGNAME=root
_=/bin/env

The output for the command env < log.log on the terminal is:

SSH_AGENT_PID=3093
HOSTNAME=localhost
SHELL=/bin/bash
TERM=xterm
DESKTOP_STARTUP_ID=
CATALINA_HOME=/opt/alfresco/tomcat
HISTSIZE=1000
XDG_SESSION_COOKIE=781d3a8afff8856da1e00a0047fcca00-1219228709.739671-1909207155
GTK_RC_FILES=/etc/gtk/gtkrc:/root/.gtkrc-1.2-gnome2
WINDOWID=23086595
QTDIR=/usr/lib/qt-3.3
CATALINA_BASE=/opt/alfresco/tomcat
QTINC=/usr/lib/qt-3.3/include
GTK_MODULES=gnomebreakpad
USER=root
JRE_HOME=/usr/java/jdk1.6.0_04/jre
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
CCACHE_DIR=/var/cache/ccache
GNOME_KEYRING_SOCKET=/tmp/keyring-vAb23I/socket
SSH_AUTH_SOCK=/tmp/ssh-ZwkBdp3031/agent.3031
SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/3031,unix/unix:/tmp/.ICE-unix/3031
MAIL=/var/spool/mail/root
PATH=/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/alfresco/bin:/root/bin
DESKTOP_SESSION=default
GDM_XSERVER_LOCATION=local
INPUTRC=/etc/inputrc
PWD=/opt
JAVA_HOME=/usr/java/jdk1.6.0_04
CCACHE_UMASK=002
LANG=en_US.UTF-8
GNOME_KEYRING_PID=3030
KDE_IS_PRELINKED=1
GDM_LANG=en_US.UTF-8
KDEDIRS=/usr
GDMSESSION=default
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SHLVL=2
HOME=/root
GNOME_DESKTOP_SESSION_ID=Default
LOGNAME=root
QTLIB=/usr/lib/qt-3.3/lib
CVS_RSH=ssh
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-DJcLqRQjMt,guid=6b2310e90ae976f10318d00048abf425
XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/
LESSOPEN=|/usr/bin/lesspipe.sh %s
WINDOWPATH=7:7
DISPLAY=:0.0
G_BROKEN_FILENAMES=1
COLORTERM=gnome-terminal
XAUTHORITY=/tmp/.gdm8GZQFU
OLDPWD=/root
_=/bin/env

So basically tomcat is not starting as well from crontab but in the shell it is.

Regards,
Vibhu.