Are you a spammer

Please note, that the first 3 posts you make, will need to be approved by a forum Administrator or Moderator before they are publicly viewable.
Each application to join this forum is checked at the Stop Forum Spam website. If the email or IP address appears there when checked, you will not be allowed to join this forum.
If you get past this check and post spam on this forum, your posts will be immediately deleted and your account inactivated.You will then be banned and your IP will be submitted to your ISP, notifying them of your spamming. So your spam links will only be seen for an hour or two at most. In other words, don't waste your time and ours.

This forum is for the use and enjoyment of the members and visitors looking to learn about and share information regarding the topics listed. It is not a free-for-all advertising venue. Your time would be better spent pursuing legitimate avenues of promoting your websites.

Backup Evolution Email by script or hand

Post your How to's here


Backup Evolution Email by script or hand

Postby bagheera1994 » Sat Nov 24, 2007 9:07 pm

Original script grabbed from the net (site in original script).
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
Born in august 1973.
http://en.wikipedia.org/wiki/August_23
Freedom is not worth having if it does not include the freedom to make mistakes.{Mahatma Gandhi}
bagheera1994
U.E. Knowledgable
U.E. Knowledgable
 
Posts: 38
Joined: Sun Nov 18, 2007 6:01 am
Location: Netherlands
Age: 113
Operating System: Ultimate Edition 2.3 32 BIT

Return to How To's (Do not post questions please)

Who is online

Users browsing this forum: No registered users and 3 guests