12-15-2008 11:22 AM
#!/bin/bash
Days=`date +%Y%m%d-%H%M%S`;
Alfresco_root="/opt/alfresco3";
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
Les echo sont la pour tester.12-19-2008 10:44 AM
12-21-2008 08:51 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.