alfresco CE5.2 backup and restore using RSYNC

cancel
Showing results for 
Search instead for 
Did you mean: 
hishjung
Member II

alfresco CE5.2 backup and restore using RSYNC

Hello, everyone!

I am using alfresco community edition 5.2 on centos7 - with bundled postgresql database.

To backup & restore it, i use RSYNC as follows.

"  

   #!/bin/sh

 

   INSTALLDIR=/alfresco-community

   now=$(date +"%Y%m%d%H%M")

    $INSTALLDIR/alfresco.sh stop

    ################# backing up alfresco database & contents  #######################

    mkdir /backup/alfbkp/"$now"

    rsync -aAXvr $INSTALLDIR/alf_data  /backup/alfbkp/"$now"/

    $INSTALLDIR/alfresco.sh start”

    ################# backing up alfresco database & contents  #######################

"

I just copy the root-dir to one backup folder.  

I am not sure that it is ok, because they said you should backup database and alfresco contents like the following document - cold backup procedure.

" Cold Backup Procedure

By default, the dir.root contains both the content and indexes, and it is possible to backup just the content and then do a full reindex when a backup is restored. A full reindex can be a time consuming process however, so the steps below include the indexes in the backup.

  1. Stop Alfresco.
  2. Backup the database Alfresco is configured to use, using your database vendor's backup tools.
  3. Backup the Alfresco dir.root directory in its entirety.
  4. Store both the database and Alfresco dir.root backups together as a single unit. For example, store the backups in the same directory or compressed file.
  5. Start Alfresco.

"

Is there any problem using my backup method? Any comments?

Thanks in advance.

4 Replies
kintu_barot
Senior Member

Re: alfresco CE5.2 backup and restore using RSYNC

You can even take a backup manually as well.

You need to take care of the few points while taking backup.

The order in which you are taking backup i.e. The order of backup must be the first index, database, and then the content stores.

Full re-indexing might take time at first start for a large number of files. So if the number of files is not more then you can prefer reindexing.

You can use any backup script which follows a backup plan in the above-mentioned order.

You can refer this Performing a hot backup | Alfresco Documentation for more info.

Regards,

Kintu

ContCentric

Regards,
Kintu
hishjung
Member II

Re: alfresco CE5.2 backup and restore using RSYNC

Dear Kintu,

Thanks for your prompt reply.
As i mentioned it, i have just installed it in bundle, so the alf_data folder has contents, Database and index.
I just want to know if i backup(cold backup) with my script, any problem will be happened when i restore it? 
Or should i backup them separately even though they are just in one folder-alf_data? 
Thanks in advance!
Regards,
Paul
kintu_barot
Senior Member

Re: alfresco CE5.2 backup and restore using RSYNC

Restoration of your Alfresco backup should not cause any issue.

You might face an issue if your contents and database are inconsistent when you have taken the hot backup. 

I have not gone through your backup script but such inconsistency can occur if you have not followed the standard backup order.

Regards,

Kintu

ContCentric

Regards,
Kintu
opsys
Active Member II

Re: alfresco CE5.2 backup and restore using RSYNC

A backup is considered good only AFTER testing a complete restore !

I just did that exercice with a different process and it did not woked out right away...

Check https://hub.alfresco.com/t5/alfresco-content-services-forum/backup-and-restore/m-p/299337#M19641