Page 1 of 1

Restore .snapshot

Posted: Sat May 17, 2014 6:31 pm
by enoch
Hi folks,

I am having a difficult time restoring mail that has disappeared from the spool (Sent items disapeared from Jan-March late last week, unsure how or why, I did not manually delete them). I am using SSH and am unable to rename the spool files to mv the snapshot in.

Is there an issue with root for users to not be able to rename the spool folders in able to copy over the weekly.0 folder to the spool?

It's been a while since using SSH, so perhaps I am doing something wrong. Could someone point me to a doc or forum post on the arguments to use, and spool DIR?

Sooner the better as there are missing sent items I need on Monday for a possible legal matter.

Re: Restore .snapshot

Posted: Mon May 19, 2014 11:05 am
by thulsa_doom
I see that you spoke with a support rep after posting this. Was he able to get you the instructions you needed? It looks like you have a fairly broad range of stuff in your "sent" directory at the moment.

Re: Restore .snapshot

Posted: Mon May 19, 2014 11:48 am
by enoch
Hail and well met thulsa_doom,

Yes, I spoke with a tech on Saturday. However, I was unable to copy the .weekly0 DIR into my spool, it appears there is a permissions issue with performing this action as non-root?

If you could also fire me the DIR in which the files need to be moved, and the DIR that the .weekly0 is kept, that would be awesome. I should have saved the SSH session as text to retain knowledge of the commands and DIRs (it's been a while since using SSH on Sonic).

Do you see any files between Jan and May? I'm somehow missing all Sent files during that timeframe somehow, and an important Sent item is required this week for a personal/legal issue.

Re: Restore .snapshot

Posted: Mon May 19, 2014 11:55 am
by enoch
OR if there is a FAQ or forum post available with the directories, and commands, that would work as well.

Re: Restore .snapshot

Posted: Mon May 19, 2014 11:59 am
by enoch
Note: Having the knowledge if there are indeed files in the weekly0 folder from January-May would be beneficial. If there are not, then we would need to move forward with a backup restore I assume.

How could this many files have gone missing? Certainly not by accidental deletion, as each message would need to be selected in a client, and then deleted, and THEN deleted from Junk, I would assume. Also, as a note, I generally only use webmail, so this makes this equally a mystery!

Re: Restore .snapshot

Posted: Mon May 19, 2014 12:37 pm
by thulsa_doom
If you're interacting with all this through shell, you can find the snapshots using the time-honored "$MAIL" environment variable:

Code: Select all

_[Sonic:/home/j/jdf]_
$ echo $MAIL
/var/spool/mail/03/27/jdf/
_[Sonic:/home/j/jdf]_
$ 
also:

Code: Select all

_[Sonic:/home/j/jdf]_
$ cd $MAIL/.snapshot/weekly.0
_[Sonic:/var/spool/mail/03/27/jdf/.snapshot/weekly.0]_
$ pwd
/var/spool/mail/03/27/jdf/.snapshot/weekly.0
_[Sonic:/var/spool/mail/03/27/jdf/.snapshot/weekly.0]_
$
and if I wanted to copy everything from my weekly.0 snapshot from the "Sent" directory to my live version:

Code: Select all

$ cp $MAIL/.snapshot/weekly.0/.Sent/cur/* $MAIL/.Sent/cur/
Between the end of January and the beginning of May, I only see three messages in that snapshot, all of which were already residing in your live Sent directory when I just looked a moment ago.

Troubleshooting conclusively why those messages disappeared is going to be difficult. The mail server logs only go back two weeks, and assuming the deletion happened at the end of the gap, we're three weeks past the event in question.

Re: Restore .snapshot

Posted: Mon May 19, 2014 12:52 pm
by enoch
Uggh. So requesting a backup is my only option?

It seems impossible that this much mail could be accidentally deleted, particularly since I use webmail exclusively (until this past weekend where I used IMAP to take a look in a mail client). Any thoughts on how that may have occurred?

Re: Restore .snapshot

Posted: Tue May 20, 2014 9:35 pm
by enoch
A restore is going to be processes, and I have used POP to grab messages in case the restore causes any issues. However, my Mailbox folders did not POP. I assume as this is configured as IMPA I can't POP those folders.

Any recommendations on how to back up folders from IMAP up before the backup restore happens? I'd like to POP them if possible to back them up locally and online.

Re: Restore .snapshot

Posted: Wed May 21, 2014 11:56 am
by thulsa_doom
The main way I've seen folks back up their mail content (either from POP to IMAP or from IMAP to POP) is to simply set up a second account in your mail client, then drag & drop from one to the other. This can take rather a long time for large folders, of course, especially when moving things from POP back to IMAP (due to upload speeds being lower on most connection types).