#!/bin/bash
Days=`date +%Y%m%d-%H%M%S`;
Alfresco_root="/opt/alfresco";
Alfresco_repository="$Alfresco_root/alfresco_repository/";
Alfresco_indexes="$Alfresco_root/alfresco_indexes/";
Alfresco_backup_dir="/opt/Alfresco_Backup_$Days";
user_mysql="alfresco";
user_password="alfresco";
alfresco_db="alfresco";
echo "=== Stoping Alfresco ==="
echo $Alfresco_root/alfresco.sh stop
echo sleep 10;
echo "=== Making the directory backup $Alfresco_backup_dir ==="
echo mkdir $Alfresco_backup_dir;
echo cd $Alfresco_backup_dir;
echo "=== Make Mysql Backup ==="
echo mysqldump --user=$user_mysql --password=$user_password $alfresco_db -q --single-
transaction
-R
-t
--disable-keys
--complete-insert|
bzip2
>
$alfresco_db_$Days.sql.backup
echo "=== Creating Aflresco Repository Backup ==="
echo tar cjfv alfresco_repository_$Days.tar.bz2 $Alfresco_repository
echo "=== Creating Alfresco Indexes Backup ==="
echo tar cjfv alfresco_indexes_$Days.tar.bz2 $Alfresco_indexes
echo "=== Restating Alfresco ==="
echo $Alfresco_root/alfresco.sh start
Apart from the examples described above, there is full featured backup tool based on
Duplicity14 and Linux oriented a Backup and Recovery tool made for Alfresco called “Alfresco
BART”15 (Alfresco Backup and Recovery Tool). It supports a variety of essentiadls features like
Days=`date +%Y%m%d-%H%M%S`;
Alfresco_root="/opt/alfresco";
Alfresco_repository="$Alfresco_root/alfresco_repository/";
Alfresco_indexes="$Alfresco_root/alfresco_indexes/";
Alfresco_backup_dir="/opt/Alfresco_Backup_$Days";
user_mysql="alfresco";
user_password="alfresco";
alfresco_db="alfresco";
echo "=== Stoping Alfresco ==="
echo $Alfresco_root/alfresco.sh stop
echo sleep 10;
echo "=== Making the directory backup $Alfresco_backup_dir ==="
echo mkdir $Alfresco_backup_dir;
echo cd $Alfresco_backup_dir;
echo "=== Make Mysql Backup ==="
echo mysqldump --user=$user_mysql --password=$user_password $alfresco_db -q --single-
transaction
-R
-t
--disable-keys
--complete-insert|
bzip2
>
$alfresco_db_$Days.sql.backup
echo "=== Creating Aflresco Repository Backup ==="
echo tar cjfv alfresco_repository_$Days.tar.bz2 $Alfresco_repository
echo "=== Creating Alfresco Indexes Backup ==="
echo tar cjfv alfresco_indexes_$Days.tar.bz2 $Alfresco_indexes
echo "=== Restating Alfresco ==="
echo $Alfresco_root/alfresco.sh start
Apart from the examples described above, there is full featured backup tool based on
Duplicity14 and Linux oriented a Backup and Recovery tool made for Alfresco called “Alfresco
BART”15 (Alfresco Backup and Recovery Tool). It supports a variety of essentiadls features like
0 comments:
Post a Comment