Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » Restoring one directory
  •  
hugo

Messages: 9
Karma: 0
Send a private message to this user
Hello

first: Sorry for my bad english Razz

i have a little problem to restore one folder from a user.

my config:

OS: Linux
Kerio path: /opt/kerio/
Backup: every night full backup (opt/kerio/) to another server

Question: A User deleted a complety directory. How get it back from the backup?

The user moved lots of his mails from the INBOX to another XXX Folder. After this job, he deleted the Folder XXX. Laughing The Folder is not in the recycler. Shocked

On my nightly backup i have the complete mails in the INBOX Folder.

now, how can i recover the old mails from the INBOX to another Folder ABC.

I tryed to move the INBOX Folder (/opt/kerio/mailserver/store/mail/domain.com/user/INBOX/) to /opt/kerio/mailserver/store/mail/domain.com/user/New Folder/ but nothing happend Confused Must i restart the Server first? I only copy it without a Server restart.

Best regards Hugo
  •  
bigmountain

Messages: 116

Karma: 0
Send a private message to this user
Hugo,

I am a little confused about your backup process? Are you using the built-in Kerio backup utility to create your nightly backups? Or are you using a third party backup solution?

If you are using the built-in Kerio backup, then you will need to decompress the zip file(s) created until you come across the directory. Copy the messages and move them over to the users mailstore directory. You will place these files into the msgs folder of the chosen directory.

If you are using a third party backup, you will do the same (I do not know if the backup is compressed or not).

After you have moved the files over to the user's directory, you will need to re-index the folder. Do this by navigating to the directory, in it locate the index.fld file and rename it to index.bad which will force Kerio to rebuild the index file listing all of the contents contained in the msgs folder of that directory. Be sure that you have the user logged out of their account while you perform this restore. You may need to make sure that you have correct permissions set for the items you moved over.

If the user simply deleted the folder and or any message contained within it, you may be able to go to their account using the Kerio Administration console and recover deleted items. But this will only work if the user deleted the folder and you have the option enabled to allow deleted items recovery in the domain setup.

I hope this helps!

Preferred Kerio Partner and Cloud Solutions Provider - Offering both shared and dedicated Kerio Connect hosting solutions.
Visit us at http://bigmountainmail.com
  •  
hugo

Messages: 9
Karma: 0
Send a private message to this user
hello,

Im using the build in Kerio backup methode and my own one Razz

every night i stop the kerio mailserver, compress and copy the whole directory /opt/kerio/ to another server.

Thanks for your help. I removed the index.fld and it works.

I found a good plugin/addon for Thunderbird user to import the Kerio eml files:

http://nic-nac-project.org/~kaosmos/mboximport-en.html

Quote:


MboxImport becomes ImportExportTools and gives you new features.
Now the extension allows you to export and import messages with more flexibility, with the following options:

Tools Menu --> Import/Export in mbox/eml format
Context menu on folders panel --> Import/Export in mbox/eml format

- export of folder in a single file (mbox format), with also the subfolders if you want;
- export of all messages in single files (eml format);
- export of all messages in single files (html or plain text format), with an index;
- export of all messages in one single plain text file;
- export of index of the messages in a folder (HTML or CSV format); - mbox files import;
- eml files import;
- import of all the eml files existing in a directory;



Best regards

Hugo
  •  
cwachs

Messages: 101
Karma: 0
Send a private message to this user
I just went through this process today and have a big problem. I had a user accidentally delete thousands of messages. Here was my process:

1) Un-zip the full backup that I wanted to restore this user from
2) Shut down Kerio
3) Moved the bad user account out of the Kerio store folder for that domain.
4) Copied in the good (backup) user account folder to that location.
5) Deleted ALL the index.fld in the good (backup) account folder and subfolders
6) rebooted and restarted Kerio

The good news is, all the mail is there for that user (as of the full back-up time).

The bad news is every single mail message looks like it arrived at the time the back-up zip file was created. Not good. What made it worse is his iPhone with ActiveSync is now trying to sync 4 GB of messages since they are within the "3 day" window that ActiveSync looks back and gets.

Is there a way to restore a single users account folders without loosing all the mail sent dates??

-----------
Server installation:
Kerio Connect 7.1
OS X Server 10.5.8
Apple G4 X Serve
  •  
Pavel Dobry (Kerio)

Messages: 5245
Karma: 251
Send a private message to this user
When the files are unpacked from the archive or copied/moved, it is important to preserve creation and modification timestamps of the files. make sure you're using correct unpacker which can ensure that.

Also, removing index.fld file makes it much worse. Do not delete any file in the message store until our technical support gives you advice to do so. To force folder re-index (which is not a general solution for any problem) rename the index.fld file to index.bad.
  •  
sedell

Messages: 1168
Karma: 1
Send a private message to this user
Kerio_pdobry wrote on Tue, 05 August 2008 05:48

To force folder re-index (which is not a general solution for any problem) rename the index.fld file to index.bad.

If the contents of the folder have changed, this doesn't always pick up mail that isn't in the index.bad file, or continues to pick up mail that isn't there because it's in the index.bad. I've run into situations where I did a re-index this way and it didn't solve the problem. I always try it first, but it doesn't always work.

Scott
  •  
sedell

Messages: 1168
Karma: 1
Send a private message to this user
cwachs wrote on Mon, 04 August 2008 17:41

The bad news is every single mail message looks like it arrived at the time the back-up zip file was created. Not good.

Is there a way to restore a single users account folders without loosing all the mail sent dates??


When you re-index by deleting the index.fld file instead of renaming it, the file date is used to re-create the sent/received date.

After you extract the mail store, try zipping the folder you want to restore, and unzip it into the location. That should preserve the file dates.

Scott
  •  
cwachs

Messages: 101
Karma: 0
Send a private message to this user
Kerio_pdobry wrote on Tue, 05 August 2008 03:48

When the files are unpacked from the archive or copied/moved, it is important to preserve creation and modification timestamps of the files. make sure you're using correct unpacker which can ensure that.

Also, removing index.fld file makes it much worse. Do not delete any file in the message store until our technical support gives you advice to do so. To force folder re-index (which is not a general solution for any problem) rename the index.fld file to index.bad.


I am using the built-in unpacker with OS X 10.4 I am unzipping in the GUI since I have to re-arrange some folders after they unzip.

This time, I had the 4 zipped files of my full-backup on the same drive as Kerio. I un-zipped all 4, combined them so the account I was needing to restore was all together and then via command line, used the "cp -r" command to move the root of the user from the back-up location to the correct location in Kerio. This was done with the server off. I then re-booted. All the dates are still today's date.

What is a better procedure for this?? The problem is when I un-zip the backups created by Kerio, this users folders span 3 of those back-ups (since his account is over 4 Gb of data).

-----------
Server installation:
Kerio Connect 7.1
OS X Server 10.5.8
Apple G4 X Serve
  •  
Pavel Dobry (Kerio)

Messages: 5245
Karma: 251
Send a private message to this user
[quote title=cwachs wrote on Wed, 06 August 2008 00:45]
Kerio_pdobry wrote on Tue, 05 August 2008 03:48

used the "cp -r" command to move the root of the user from the back-up location to the correct location in Kerio.



And this is exactly the wrong way. Use "cp -r -P" to preserve file timestamps.
  •  
cwachs

Messages: 101
Karma: 0
Send a private message to this user
[quote title=Kerio_pdobry wrote on Wed, 06 August 2008 02:46]
cwachs wrote on Wed, 06 August 2008 00:45

Kerio_pdobry wrote on Tue, 05 August 2008 03:48

used the "cp -r" command to move the root of the user from the back-up location to the correct location in Kerio.



And this is exactly the wrong way. Use "cp -r -P" to preserve file timestamps.


And that would explain why it works now.

-----------
Server installation:
Kerio Connect 7.1
OS X Server 10.5.8
Apple G4 X Serve
  •  
anthony.somerset

Messages: 144

Karma: 0
Send a private message to this user
hi everyone just to let you know this worked perfectly when i had to recover a users calendar

i renamed the index.fld to index.bad and just restarted the server

in a side note, would anyone know why although the server emails me everyday to tell me its backed up succesffuly

i didnt actually have backup files for friday AM, Saturday AM and Sunday AM, the last file i had was my thursday backup which was my weekly full backup and i did have monday AM's incremental (at which point too late Smile )

does anyone have any thoughts or reccomendations - i currently backup onto an external firewire device hooked up to my xserve

Mac Xserve Intel - 2x 2.7GHz Dual Core Xeon
Leopard 10.5.8
4GB Ram
1.25 TB HDD Raid 5
Kerio 6.7.1
~60 Users (varying windows and mac Exchange or IMAP)
18 iPhones
  •  
NigelH

Messages: 78
Karma: 0
Send a private message to this user
<_a.t_>Kerio_pdobry

I think it's:
cp -rp

cp -r -P will not work on 10.5+

Have you tried the ditto command. This is useful if you have to merge files rather than replace.

<_a.t_>Hugo
this is from the Kerio Manual. It is an example of restoring one user folder. I think this will overwrite the folder, so I would locally store any mail that has come in since the backup and then do this. Then import them back in with your email client.

If there are special circumstances where the above would work better. For example, I needed to merge some emails from the back up with the existing store.

http://www.kerio.com/manual/kms/en/sect-kmsrecover.html

Quote:

Recovery of a single folder of a user

* The directory with the backup is stored on an external disk,
*one specific folder of the user mailbox must be gained from the backup (Sent Items in this case),
*the command is run in the verbose mode (parameter -v) which allows to monitor the recovery process.

./kmsrecover -v -d company.com -u jsmith -f "Sent Items" /Volume/backup/F20051009T220008Z.zip

Kerio Mail Server 6.7.2 Build 7821
Mac OS X Server 10.5.8
Previous Topic: HTML mails as TXT
Next Topic: KMS on OpenSUSE 11.1 64-bit
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Tue Sep 26 23:43:28 CEST 2017

Total time taken to generate the page: 0.00492 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.