A handy script for backing up your emails in Evolution mail client

Advertisements

evo-logoEvolution is one of the best e-mail clients available for the linux platform. In this article we will tell you how to automate the process of backing up your e-mails in the Evolution mail client using a simple shell script.

Once you configure and start using Evolution mail client, a file called .running is created in your HOME-Directory/.evolution directory. This is the file which we need to periodically back-up in order to save all your email and evolution settings. We will name the file as evo-back.tar.gz and will be located inside your home directory. Here is the code for the script:

#!/bin/bash
backupfile=“$HOME/evo-back.tar.gz”
if [ -e "$backupfile" ]
then
rm “$HOME/evo-backup.tar.gz”
fi
evolution –force-shutdown
rm “$HOME/.evolution/.running”
gconftool-2 –dump /apps/evolution > $HOME/.evolution/backup-restore-gconf.xml
cd $HOME && tar chf – .evolution .camel_certs | gzip > “$HOME/evo-backup.tar.gz”
evolution

You can directly download the script from here. To run the script, just open up a shell (terminal) and then make the script executable by running the command chmod +x <script-name> Now you can run the script by simply using the command sh <script-name>

In order to automate the backup process you need to place this script file in your /etc/cron.daily directory. You may also get an error that says .camel_certs file does not exist but simply ignore it. Thanks Shane



October 1st, 2009 Written by The Digitizor    

Free subscription: Subscribe RSS feed or get daily tips in your email
* Click confirmation link sent in email * Don't see the email? check spam folder

  Facebook 


Liked it? Share...   Digg It!   Submit to Del.icio.us   Submit to Reddit   Stumble   Submit to Identica   Slashdot It   Send to a friend via email


blog comments powered by Disqus