Inizio  >  Docs  >  Linux  >  Trucchi veloci  >  Evolution  
EvolutionEvolution

Index

backup / restore

Backup

evolution --force-shutdown
gconftool-2 --shutdown
gconftool-2 --dump /apps/evolution > evolution_setting.xml
tar -cvzf evolution-backup.tar.gz .evolution .gconf/apps/evolution .gnome2_private/Evolution evolution_setting.xml
Restore
evolution --force-shutdown
gconftool-2 --shutdown
tar xzf evolution-backup.tar.gz
gconftool-2 --unload evolution_setting.xml
gconftool-2 --load evolution_setting.xml
 
#!/bin/bash
#-----------------------------------------------------------------------#
# #
# Description : Backup an evolution profil #
# OS : Linux #
# Requires : evolution - tar #
# Version : 0.1.4 #
# #
#-----------------------------------------------------------------------#

# Set script variable
USER=$(id -un)
GROUP=$(id -gn)
DATE=`date "+%F"`

# Go to user homedir
clear
cd /home/$USER

# Shutdown application
gconftool-2 --shutdown
evolution --force-shutdown

# Backup evolution setting
gconftool-2 --dump /apps/evolution > evolution_setting.xml

# Make a restore help file
/bin/cat > RESTORE_README.txt <<FINCONFIG
#!/bin/bash
# To restore your evolution profil, after extract this archive file,
# use the following command :

cd /home/$USER
gconftool-2 --shutdown
evolution --force-shutdown
tar jxvf bkp-evolution-$DATE.tar.bz2
gconftool-2 --unload evolution_setting.xml
gconftool-2 --load evolution_setting.xml
rm -f evolution_setting.xml
FINCONFIG

# Compress and backup
nice -n +10 tar cvfj bkp-evolution-$DATE.tar.bz2 --exclude=.evolution/mail/imap .evolution .gconf/apps/evolution .gnome2_private/Evolution .camel_certs evolution_setting.xml RESTORE_README.txt

# Remove tmp files
rm -f evolution_setting.xml
rm -f RESTORE_README.txt

# Change owner (for crontab use)
chown $USER:$GROUP bkp-evolution-$DATE.tar.bz2

# Display final backup message
echo "Evolution backup is finish !"
 
 

Torna sł