53 lines
1.7 KiB
Text
53 lines
1.7 KiB
Text
Pour passer de PhpCompta 1.2.1 à phpcompta 1.2.2
|
|
-------------------------------------------------
|
|
Pour tout le monde, faire http://localhost/admin/setup.php
|
|
après un bon backup
|
|
|
|
|
|
|
|
|
|
|
|
POUR CE SUIT CELA CONCERNE
|
|
UNIQUEMENT POUR LES VERSIONS INSTALLEES SOUS UNIX IL N'Y
|
|
A PLUS RIEN A FAIRE POUR LES VERSIONS FONCTIONNANT SOUS WINDOWS
|
|
|
|
|
|
|
|
primo )
|
|
faire un backup complet de votre systeme de base de données
|
|
grâce à ce petit script
|
|
la valeur de TARGET_DIR peut être adapté
|
|
############################################################################
|
|
TARGET_DIR=/opt/backup/database
|
|
TARGET=`psql -l -t|awk '{print $1;}'|grep -v template`
|
|
|
|
for DATABASE in $TARGET;do
|
|
echo "Database $DATABASE"
|
|
if [ ! -d $TARGET_DIR/$DATABASE ]; then
|
|
mkdir $TARGET_DIR/$DATABASE
|
|
if [ $? -ne 0 ]; then
|
|
echo "Cannot create directory [ $TARGET_DIR/$DATABASE ]"
|
|
continue
|
|
fi
|
|
fi
|
|
BACKUP=$TARGET_DIR/$DATABASE/$DATABASE.$(date '+%Y-%m-%d-%H-%M').sql
|
|
pg_dump -Fc -b -O -C $DATABASE > $BACKUP
|
|
gzip -f $BACKUP
|
|
|
|
cp $BACKUP.gz /home/backup
|
|
echo "--->"
|
|
done
|
|
############################################################################
|
|
pour restaurer (si besoin) il suffit de taper la commande
|
|
|
|
pg_restore -C --host=localhost --port=5432 -d template1 -v -Fc fichier_dezippe
|
|
remarque: les lob seront sauvegardés.
|
|
|
|
secundo)
|
|
passez Postgresql à la version 8.0.3 ou supérieure (bien lire la doc)
|
|
n'oubliez pas le point primo pour sauver vos données
|
|
|
|
tertio)
|
|
important : pour chaque base de données, il faut taper la commande en bash
|
|
createlang plpgsql BASE_DE_DONNEE
|
|
|