Used /tested on Ultimate 1.6
Original script grabbed by me from the net:
- Code: Select all
#!/bin/bash
#-----------------------------------------------------------------------#
# #
# Description : Backup an evolution profil #
# OS : Linux #
# Requires : evolution - tar #
# Version : 0.1.4 #
# Author : Sebastien Bilbeau <sebastien.bilbeau CHEZ gmail.com> #
# Web site : http://www.tux-planet.fr/ #
# #
#-----------------------------------------------------------------------#
# 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 !"
Mine modified backup script with restore script and notification for the user:
- Code: Select all
#!/bin/bash
#-----------------------------------------------------------------------#
# #
# Description : Backup an evolution profil #
# OS : Linux #
# Requires : evolution - tar #
# Version : 0.1.4 #
# Author : Sebastien Bilbeau <sebastien.bilbeau CHEZ gmail.com> #
# Web site : http://www.tux-planet.fr/ #
# #
#-----------------------------------------------------------------------#
# Updated /modified by Bagheera 25-11-2007 for the users of Ultimate 1.6
# Set script variable
USER=$(id -un)
GROUP=$(id -gn)
DATE=`date "+%F"`
TIME=`date "+%T"`
# 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
# Make a restore automated script to use to restore
/bin/cat > Run_Me_To_RESTORE <<FINCONFIG
#!/bin/bash
# To restore your evolution profil, after extract this archive file,
# use the following command :
cp bkp-evolution-*.tar.bz2 /home/$USER/
cd /home/$USER
gconftool-2 --shutdown
evolution --force-shutdown
tar jxvf bkp-evolution-*.tar.bz2
gconftool-2 --unload evolution_setting.xml
gconftool-2 --load evolution_setting.xml
rm -f evolution_setting.xml
rm -f bkp-evolution-*.tar.bz2
rm -f RESTORE_README.txt
zenity --info --title "Evolution Email Restore" --text "Evolution Email was successfully restored."
FINCONFIG
mkdir Evolution_Backup_$DATE
chmod +x /home/$USER/Run_Me_To_RESTORE
mv /home/$USER/Run_Me_To_RESTORE /home/$USER/Evolution_Backup_$DATE/
# Compress / backup and move to directorie
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
mv /home/$USER/bkp-evolution-*.tar.bz2 /home/$USER/Evolution_Backup_$DATE/
# Remove tmp files
rm -f evolution_setting.xml
rm -f RESTORE_README.txt
# Change owner (for crontab use)
chown $USER:$GROUP /home/$USER/Evolution_Backup_*/bkp-evolution-*.tar.bz2
# Make a reminder on the user Desktop that backup is done.
touch /home/$USER/Desktop/Evolution_Backup_Done_$DATE.$TIME.txt
# Display final backup message
zenity --info --title "Evolution Email Backup" --text "Evolution Email Backup was successfully done, you can restore Evolution by running the script 'Run_Me_To_RESTORE' from the created Evolution Backup directorie located in your home dir."
Copy and paste into file called: bkp_evolution
Copy file to /usr/local/bin/
# chown root:root /usr/local/bin/bkp_evolution
# chmod 755 /usr/local/bin/bkp_evolution
I have made a starter from menu. but you can do a cronjob also.
Greetz Bagheera1994