Copying ~/Mail synced via mbsync to new machine... safe?

31 views
Skip to first unread message

Jack Baty

unread,
Feb 3, 2018, 2:15:11 PM2/3/18
to mu-discuss
I'm setting up a new (Manjaro) Linux install and would like to avoid having to re-sync all of my email from scratch via mbsync. Can I just copy the ~/Mail directory from my Mac to ~/Mail on the new machine before running mbsync?

Thanks

Jack

Eduardo Mercovich

unread,
Feb 3, 2018, 3:26:19 PM2/3/18
to mu-di...@googlegroups.com
Hi Jack.
I believe it should work. Just:

1. Make a backup of everything (you'll probably do it anyway, but
just to be on the safe side)... ;)

2. Copy the directory.

3. Sync (it shouldn't be much if you do it in a few minutes).

4. Run "mu index --rebuild".

What do the rest of you think?


--
Eduardo Mercovich

Donde se cruzan tus talentos
con las necesidades del mundo,
ahí está tu vocación.
(Anónimo)

Yuri D'Elia

unread,
Feb 3, 2018, 6:59:30 PM2/3/18
to mu-di...@googlegroups.com
Don't forget mbsync's state directory if you want to avoid syncing to
begin with. Depending on your setup, this can be in ~/.mbsync or as a
subdirectory of ~/Mail.

I'm not sure if mbsync cares, but I'd make sure you preserve the
file timestamps as well.

Jack Baty

unread,
Feb 3, 2018, 10:50:02 PM2/3/18
to mu-discuss
Well, I went for it and the only issue is that I seem to have a lot of messages that are now marked as unread. Looks like everything synced ok otherwise.

Thanks for the help.

Jack Baty

unread,
Feb 12, 2018, 7:18:54 AM2/12/18
to mu-discuss
In case anyone runs across this thread, I'd recommend _not_ copying synced mail from macOS to Linux.

After struggling for a few days dealing with unread messages, it seems that copying the entire ~/Mail directory from my Mac to Linux machines wasn't a great idea. Mu4e file naming patterns seem to differ across platforms (:2,S vs /2,S) and even after forcing all of the messages to be "Read" on my Mac and syncing, they'd revert back to unread after syncing again on Linux. I also noticed that the file names on Linux had "funky" characters and what appeared to be a duplicated suffix (file names ended something like ":2,/2,S" where the ":" was replaced with a non-printable character). 

I finally just moved the existing ~/Mail directory out of the way on the ThinkPad and ran mbsync again from scratch. No more issues with unread emails and the filenames look "normal" on both machines.

It's of course possible I just did something wrong and that this could work under other conditions, so I guess just use caution.

Jack

Eduardo Mercovich

unread,
Feb 12, 2018, 10:55:33 AM2/12/18
to Mu Discuss
Hi Jack.

Thanks for sharing your experience... :)

--
eduardo mercovich


Donde se cruzan tus talentos
con las necesidades del mundo
ahí está tu vocación.

--
You received this message because you are subscribed to the Google Groups "mu-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mu-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joost Kremers

unread,
Feb 12, 2018, 11:41:24 AM2/12/18
to mu-di...@googlegroups.com

On Mon, Feb 12 2018, Jack Baty wrote:
> In case anyone runs across this thread, I'd recommend _not_
> copying synced
> mail from macOS to Linux.
>
> After struggling for a few days dealing with unread messages, it
> seems that
> copying the entire ~/Mail directory from my Mac to Linux
> machines wasn't a
> great idea. Mu4e file naming patterns seem to differ across
> platforms (:2,S
> vs /2,S)

Well, in the olden days of Classic Mac OS, the colon was the
directory separator, and AFAIK it's still a "reserved" character
in filenames on macOS. On Linux, a forward slash is not allowed in
filenames, so my guess is that something went wrong with the
filenames when you copied over the mail directories. The exact
details elude me, though...


--
Joost Kremers
Life has its moments
Reply all
Reply to author
Forward
0 new messages