Evolution backup script
Voici un script que j'ai réalisé et qui permet de faire une sauvegarde complète de son profil sous evolution.
I have made a script which can backup an evolution profil.
1. Caractéristiques
Ce script :
- ferme evolution et gconf2
- fait une sauvegarde des paramètres d'evolution contenus dans le gconf
- fait une sauvegarde du dossier .evolution sauf .evolution/mail/imap
- fait une sauvegarde des dossiers .gconf/apps/evolution, .gnome2_private/Evolution et .camel_certs
- créé un fichier RESTORE_README.txt, contenant les instructions de restauration
- met le tout dans une archive bkp-evolution-$DATE.tar.bz2
- supprime les fichiers temporaires
2. Utilisation
Pour l'installer, lancez les commandes suivantes :
wget www.tux-planet.fr/public/dev/shell/bkp_evolution
chmod +x bkp_evolution
Il suffira ensuite de lancer la commande ./bkp_evolution dans un terminal pour réaliser la sauvegarde. Ce script a également été programmé pour fonctionner dans une crontab.
Télécharger le script : bkp_evolution
---------------------
English translation :
1. Features
This script :
- shutdown evolution and gconf2
- backup your evolution setting
- backup .evolution folder without .evolution/mail/imap
- backup .gconf/apps/evolution, .gnome2_private/Evolution and .camel_certs directories
- make RESTORE_README.txt, a restore instructions file
- compress all in a bkp-evolution-$DATE.tar.bz2 archive
- remove all tmp files
2. Use
To use it, launch this command :
wget www.tux-planet.fr/public/dev/shell/bkp_evolution
chmod +x bkp_evolution
To make an evolution backup, just execute the ./bkp_evolution command in a terminal. This script can also work with a crontab.
Download the script : bkp_evolution
11 Commentaires pour "Evolution backup script"
Flux des commentaires de cet article Ajouter un commentaireI am very happy of your script. As a little warning i have to say that, having done the back-up manually the other day (from FC5 to a GC5 machine) i had only a little problem with 2 folder summaries/content.
I've then removed the evolution made "indexes" and then relaunched Evo et voilla, all was ok again.
Ciao !
I have upgraded this script to 0.1.1 version. Now, it makes a backup of evolution with a lower process priority.
J'ai mis à jour le script en version 0.1.1. Maintenant, il fait une sauvegarde d'evolution avec une priorité de processus moins élevée.
Maybe it's better to make notice that the script initialize the $USER variable to: pti-seb and so one has to modify it manually before the execution.
I have upgraded this script to 0.1.2 version. Just add "gconftool-2 --unload evolution_setting.xml" line in the script, to fix a bug during the restoration of the configuration.
J'ai mis à jour le script en version 0.1.2. J'ai juste ajouté la ligne "gconftool-2 --unload evolution_setting.xml" dans le script, afin de corriger un bug lors de la restauration de la configuration.
Ce script est bien pratique, mais il serait encore mieux si il était un peu plus générique.
Quelques modifs :
//déclaration des variables
USER=$(id -un) //au lieu de pti-seb
GROUP=$(id -gn)
//et du coup on a
# Change owner (for crontab use)
chown $USER:$GROUP bkp-evolution-$DATE.tar.bz2
Merci,
A+
Ok Pingoomax, je viens de modifier le script en version 0.1.3, afin qu'il puisse récupérer automatiquement l'id de l'utilisateur et de son groupe.
I have upgraded this script to 0.1.3 version. Now, it's can automatically get your user and group id.
J'ai cette erreur... :s
[mrtom@localhost Desktop]$ bkp_evolution
bash: /usr/local/bin/bkp_evolution: /bin/bash^M: bad interpreter: Aucun fichier ou répertoire de ce type
Cela veut dire qu'il ne trouve pas la commande bkp_evolution ni dans /usr/local/bin/, ni dans /bin/bash.
Donc vérifie qu'elle existe bien :
ll /usr/local/bin
et qu'elle a les bons droits :
chown root:root /usr/local/bin/bkp_evolution
chmod 755 /usr/local/bin/bkp_evolution
MrTom,
Le script est en format DOS, il faut le convertir en format Unix avec fromdos (comme root) :
fromdos /usr/local/bin/bkp_evolution
And for the benefit of those not speaking French, the script is in DOS text format, it needs to be converted to Unix format using fromdos (as root) ;
fromdos /usr/local/bin/bkp_evolution
If you get /bin/bash^M: bad interpreter:
sudo apt-get install tofrodos
fromdos /usr/local/bin/bkp_evolution
Bonsoir,
Je viens d'utiliser votre scipt pour migrer ma messagerie de fc6 à fedora8,
et j'ai tout retrouvé, formidable et merci beaucoup de votre aide
S.MICHEL