Koozali.org: home of the SME Server

Can I make the backup ONLY of my emails ??

Offline m4oz!nh4

  • ***
  • 49
  • +0/-0
Can I make the backup ONLY of my emails ??
« on: February 26, 2008, 05:47:28 AM »
Hi everyone,

I have a clean install v7.2 and I'm running e-smith only server and for the email the users access the SME server using IMAP.

I beleive I can perform a full backup from a SME Server (from the command line or through web site) but can I make the backup ONLY of my emails ??

I mean, recording in a type or USB External drive, for example: the everyday's emails so in case I need to repair an importante email that was deleted for one of my users so i can repair it. is it possible ?

Thanks in advance

Offline SoftDux

  • *****
  • 240
  • +0/-0
    • http://www.SoftDux.com
Re: Can I make the backup ONLY of my emails ??
« Reply #1 on: February 26, 2008, 08:01:12 AM »
I want to think with DAR / DAR2 or Affa you should be able to configure what exactly you want to download. Check the contribs section on the Wiki for more info on these 3 backup contribs

Offline m

  • *****
  • 276
  • +0/-0
  • Peet
Re: Can I make the backup ONLY of my emails ??
« Reply #2 on: February 26, 2008, 11:36:45 AM »
Setting up an Affa backup job is pretty simple. The following assumes that you have an ext3 formatted USB disk mounted on /mnt/usbdisk. It will backup the mails of the users jsixpack, bsimpson and ltrenker every 3 hours. Just run the commands

Code: [Select]
db affa set mailonly job
 db affa setprop mailonly remoteHostName localhost
 db affa setprop mailonly TimeSchedule 0700,1000,1300,1600,1900,2200,0100,0400
 db affa setprop mailonly scheduledKeep 8
 db affa setprop mailonly SMEServer no
 db affa setprop mailonly RootDir /mnt/usbdisk
 db affa setprop mailonly Include[0] /home/e-smith/files/users/jsixpack/Maildir
 db affa setprop mailonly Include[1] /home/e-smith/files/users/bsimpson/Maildir
 db affa setprop mailonly Include[2] /home/e-smith/files/users/ltrenker/Maildir
 affa --make-cronjobs

and you are done.

Consult the Affa Wiki page on how to install Affa and for more configuration options. Also read the USBDisks HowTo.

Offline m4oz!nh4

  • ***
  • 49
  • +0/-0
Re: Can I make the backup ONLY of my emails ??
« Reply #3 on: March 05, 2008, 03:03:28 AM »
Code: [Select]
db affa set mailonly job
 db affa setprop mailonly remoteHostName localhost
 db affa setprop mailonly TimeSchedule 0700,1000,1300,1600,1900,2200,0100,0400
 db affa setprop mailonly scheduledKeep 8
 db affa setprop mailonly SMEServer no
 db affa setprop mailonly RootDir /mnt/usbdisk
 db affa setprop mailonly Include[0] /home/e-smith/files/users/jsixpack/Maildir
 db affa setprop mailonly Include[1] /home/e-smith/files/users/bsimpson/Maildir
 db affa setprop mailonly Include[2] /home/e-smith/files/users/ltrenker/Maildir
 affa --make-cronjobs

Thanks mweinber,
I already ran the commands and in the last command (affa --make-cronjobs) I got: not found this command.

let me ask you, how do I now if I have affa already running in the server?
because sometimes I can use: wget to go to same website for install same contrib file.

do I just need to type all commands as you showed me ?

Thanks
« Last Edit: March 05, 2008, 03:16:46 AM by m4oz!nh4 »

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Can I make the backup ONLY of my emails ??
« Reply #4 on: March 05, 2008, 10:19:41 AM »
m4oz!nh4

Quote
how do I now if I have affa already running in the server?

Affa is not installed by default. Follow this article to install Affa and then try again
http://wiki.contribs.org/Affa
« Last Edit: March 05, 2008, 11:22:05 AM by RayMitchell »
...

Offline m

  • *****
  • 276
  • +0/-0
  • Peet
Re: Can I make the backup ONLY of my emails ??
« Reply #5 on: March 05, 2008, 11:04:08 AM »
@m4oz!nh4
The example shows minimal setup. You need to execute the commands only once, but you can modify or add properties anytime using 'db affa setprop ...' command. You'll find all options described on the Affa Wiki page.
The last command  'affa --make-cronjobs' installs cron jobs as defined in the 'TimeSchedule' property.

Offline m4oz!nh4

  • ***
  • 49
  • +0/-0
Re: Can I make the backup ONLY of my emails ??
« Reply #6 on: March 06, 2008, 07:36:36 AM »
Thanks

I Follow the affa's article (http://wiki.contribs.org/Affa) to install Affa...

Under /usr/bin I typed
yum install --enablerepo=smecontribs smeserver-affa and I got this error:

loading "fastestmirror" plugin
loading "smeserver" plugin

error getting repository data for smecontribs, repository not found.

no new rpms were installed


any advice ?

Thanks

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Can I make the backup ONLY of my emails ??
« Reply #7 on: March 06, 2008, 08:04:49 AM »
m4oz!nh4

Quote
repository not found.

The smecontribs repo is not configured as you are still running sme7.2
You can manually configure it, but the easiest solution is to upgrade to 7.3, do
yum update

after the system updates & you have done the post-upgrade & reboot commands, you can then run the command again to install smeserver-affa

...

Offline m4oz!nh4

  • ***
  • 49
  • +0/-0
Re: Can I make the backup ONLY of my emails ??
« Reply #8 on: March 06, 2008, 08:11:20 AM »
Thanks RayMitchell,

Yes, I am using sme 7.2

I understood but can I go for the manually configuration of the smecontribs repo ? for so if you can give some tips... thanks...

many thanks !!
« Last Edit: March 06, 2008, 08:12:56 AM by m4oz!nh4 »

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Can I make the backup ONLY of my emails ??
« Reply #9 on: March 06, 2008, 08:39:44 AM »
m4oz!nh4

See
http://wiki.contribs.org/SME_Server:Documentation:FAQ#Which_repositories_should_be_enabled
and
http://wiki.contribs.org/Category:Yum_Repository

Use this code
Code: [Select]
db yum_repositories set smecontribs repository \
Name 'SME Server - contribs' \
BaseURL 'http://mirror.contribs.org/pub/smeserver/releases/7/smecontribs/$basearch' \
MirrorList 'file:///etc/yum.repos.d/mirrors-smecontribs' \
EnableGroups yes \
GPGCheck yes \
Visible no \
status disabled

expand-template /etc/yum.conf


To check your work

Code: [Select]
db yum_repositories show smecontribs
smecontribs=repository
    BaseURL=http://mirror.contribs.org/pub/smeserver/releases/7/smecontribs/$basearch
    EnableGroups=yes
    GPGCheck=yes
    MirrorList=file:///etc/yum.repos.d/mirrors-smecontribs
    Name=SME Server - contribs
    Visible=no
    status=disabled
« Last Edit: March 06, 2008, 09:04:22 AM by RayMitchell »
...

Offline m

  • *****
  • 276
  • +0/-0
  • Peet
Re: Can I make the backup ONLY of my emails ??
« Reply #10 on: March 06, 2008, 08:48:05 AM »
Ray, you have a line break in the BaseURL line

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Can I make the backup ONLY of my emails ??
« Reply #11 on: March 06, 2008, 09:02:56 AM »
mweinber

Thanks, fixed
...