PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Logiciels d'hébergement > comp.mail.imap > Backing up gmail to IMAP or mbox (imapsync?)
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.mail.imap Discussion of IMAP-based mail systems.

Backing up gmail to IMAP or mbox (imapsync?)

Réponse
 
LinkBack Outils de la discussion
Vieux 18/08/2008, 12h55   #1
Ponstructor
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Backing up gmail to IMAP or mbox (imapsync?)

Hi all,

I'm in the process of migrating my email to gmail to be more flexible
on the road. However, I want my home server to be constantly backing
up / syncing my gmail to my home network so it's there if anything
goes wrong (and to backup).

At home I have dovecot IMAP and I have a number of mail trees served
up via different IMAP namespaces on a gentoo linux system. My
intention is to make one of these namespaces "GMailBackup" so that I
can just include that in my IMAP client and access it on my home
network whenever I want to. Dovecot is set up for mbox.

So I need a solution that can run in the background (cron job) and
either

1) Sync my gmail account to a local mbox store (that would then get
served up by dovecot)

or

2) Sync my gmail account to the "GMailBackup" namespace.

With 1) I've looked at getmail / fetchmail but both of these require
that the mailboxes/folders I want to sync need to be specified -
because gmail maps IMAP folders to labels I want the solution to pick
up new folders automatically and sync them to local store.

With 2) I've looked at imapsync - but it has hopeless documentation.
I can mangle a few things - such as mangling the gmail INBOX to be
GMailBackup/INBOX using --regextrans2. However it is really slow,
sizing folders in all the local namespaces and seemingly no way in
which to specify just one namespace to sync to.

offlineimap has no --dry-run option (or whatever) and that makes it
too dangerous.

Has anyone got a suggestion, or perhaps some with imapsync to
make this happen?

Cheers,

W.
  Réponse avec citation
Vieux 18/08/2008, 15h01   #2
Gilles Lamiral
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Backing up gmail to IMAP or mbox (imapsync?)

Hello Ponstructor,

> With 2) I've looked atimapsync- but it has hopeless documentation.


Ok.
Did you really read it?
http://www.linux-france.org/prj/imapsync/README
http://www.linux-france.org/prj/imapsync/FAQ

> I can mangle a few things - such as mangling the gmail INBOX to be
> GMailBackup/INBOX using --regextrans2.


Yes.

> However it is really slow,


Ok. Several options can speed a backup.

> sizing folders in all the local namespaces


--nofoldersizes

> and seemingly no way in
> which to specify just one namespace to sync to.


Option --regextrans2 allows to sync anywhere, no?

--
Au revoir, 02 99 64 31 77
Gilles Lamiral. France, Chavagne (35310) 06 20 79 76 06
  Réponse avec citation
Vieux 19/08/2008, 14h20   #3
Ponstructor
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Backing up gmail to IMAP or mbox (imapsync?)

Hi Gilles

On Aug 18, 11:01pm, Gilles Lamiral <gilles.lami...@gmail.com> wrote:
> Hello Ponstructor,
>
> > With 2) I've looked atimapsync- but it has hopeless documentation.

>
> Ok.
> Did you really read it?http://www.linux-france.org/prj/imap...j/imapsync/FAQ


Copiously - that's how I got as far as I got

>
> > I can mangle a few things - such as mangling the gmail INBOX to be
> > GMailBackup/INBOX using --regextrans2.

>
> Yes.
>
> > However it is really slow,

>
> Ok. Several options can speed a backup.
>
> > sizing folders in all the local namespaces

>
> --nofoldersizes


That s - the main slow down (having just watched it with --
debugimap) is the STATUS lines on the destination server. It bogs
down getting status of folders on namespaces that I never want it to
use. In the end speed isn't a dealbreaker (after all it will be
running in the background) but it's annoying for debugging. If I
could just tell it to ignore all but one of the namespaces...

>
> > and seemingly no way in
> > which to specify just one namespace to sync to.

>
> Option --regextrans2 allows to sync anywhere, no?


OK. Fair enough. Here's my current attempt, looks like it should
work.

imapsync --host1 imap.gmail.com --user1 gmailuser --password1 pass --
host2 destination --user2 user --password2 pass --ssl1 --ssl2 --
exclude \[Gmail\]/All Mail --exclude \[Gmail\]/Spam --
syncinternaldates --regextrans2 "s#(.*)#GMAILBUP/$&#" --nofoldersizes
--useheader 'Message-Id' --skipsize --justfolders --dry

Thanks, Appreciate the .

W.


>
> --
> Au revoir, 0299 64 31 77
> Gilles Lamiral. France, Chavagne (35310) 06 20 79 76 06


  Réponse avec citation
Vieux 20/08/2008, 08h41   #4
Gilles Lamiral
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Backing up gmail to IMAP or mbox (imapsync?)

Hello Ponstructor,

> Copiously - that's how I got as far as I got


If you want to write better doc you're welcome.

> That s - the main slow down (having just watched it with --
> debugimap) is the STATUS lines on the destination server. It bogs
> down getting status of folders on namespaces that I never want it to
> use. In the end speed isn't a dealbreaker (after all it will be
> running in the background) but it's annoying for debugging. If I
> could just tell it to ignore all but one of the namespaces...


--folder INBOX

> > > and seemingly no way in
> > > which to specify just one namespace to sync to.


--folderrec "topfolder"

> imapsync--host1 imap.gmail.com --user1 gmailuser --password1 pass --
> host2 destination --user2 user --password2 pass --ssl1 --ssl2 --
> exclude \[Gmail\]/All Mail --exclude \[Gmail\]/Spam --
> syncinternaldates --regextrans2 "s#(.*)#GMAILBUP/$&#" --nofoldersizes
> --useheader 'Message-Id' --skipsize --justfolders --dry


imapsync \
--host1 imap.gmail.com --user1 gmailuser --password1 pass --ssl1 \
--host2 destination --user2 user --password2 pass - --ssl2 \
--nofoldersizes --useheader 'Message-Id' --skipsize \
is OK

In order to select only some folders you can use
--folder
--folderrec
--include

In order to speed up:
- select last messages : --maxage
- do not sync flags again and again : --fast

It's time I start a wiki.

--
Au revoir, 02 99 64 31 77
Gilles Lamiral. France, Chavagne (35310) 06 20 79 76 06

  Réponse avec citation
Vieux 25/10/2008, 06h45   #5
John Mayson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Backing up gmail to IMAP or mbox (imapsync?)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I didn't dig far enough. I think the OP of this thread is trying to do
the same thing I am. I'll look at it when I'm more awake. :-)

- --
John Mayson <john@mayson.us>
Austin, Texas, USA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFJAqRu2kz4fWh3iuERAiXvAJ4qw7VpY6DxZYOyT1S6ZD iRraIOKACfV3+l
NiTo/Sphpw0tXePctIPYQNc=
=ubip
-----END PGP SIGNATURE-----
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 14h37.


Édité par : vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,60709 seconds with 13 queries