cancel
Showing results for 
Search instead for 
Did you mean: 

Backup and restore

vasanthakumar
Champ in-the-making
Champ in-the-making
hi

i want to take full back up ! i tried add on tools. but am not satisfied. i gone through the 4.2 help documentation. i could not clear with the steps

what i have is only installation files!

please provide me the steps to back up and recovery

1 REPLY 1

rjohnson
Star Contributor
Star Contributor
Assuming that you have used the default install then so far as I understand it everything to do with Alfresco data is in a folder {alfresco-installation-dir}/alf_data and absolutely everything you installed is in {alfresco-installation-directory}.

So, if you just want to backup your Alfresco data you simply shutdown Alfresco completely (including postgreSQL); this is usually done just by doing ./alfresco.sh stop. Then you can use tar to back up alf_data using something like


tar cfzP {backup-folder}/alf_data.tar.gz {alfresco-installation-directory}/alf_data


and then restart Alfresco using ./alfresco.sh start

To restore the data I have found it is really important to remove the existing alf_data folder and then restore, rather than restore over the top of it. Restoring over the top of it has caused me some indexing issues I suspect because there are files in alf_data that are not in the database.

So, for safety I always do the following. Stop alfresco (./alfresco.sh stop). Rename alf_data to something else "just in case", then you can use tar to restore alf_data using something like


tar xfzP {backup-folder}/alf_data.tar.gz {alfresco-installation-directory}/alf_data


and then restart Alfresco using ./alfresco.sh start


Now, if you have a very large Alfresco installation then this "cold" backup process may not work for you as the backup may take to long. As I understand it documents don't "move around in alf_data" so you can use a variation on this which is to do a full tar backup of alf_data every week, then incrementals every day for the rest of the week which will significantly reduce the elapsed backup time but make restore more complex. I have never tried this and I suspect that you might run into the "orphan document" index issue if you create and delete a document inbetween full backups. Whether or not this is a problem and if it is how you fix it, is beyond my experience.

There are "hot" backup processes in this forum and on the internet which I have never tried, but the standard "cold" process above does work for me.