Retain (all versions)
This article discusses the high-level archive job flow. The intended audience is Retain customers and partners. Support engineers should look to internal documentation for a more accurate "under the hood" understanding.
1. The Worker polls the Server every 10 minutes (default) for new queued jobs it may need to run. It launches the job.
2. The Worker connects to the mail system and does a login to each mailbox. For every mailbox, it requests the items in that mailbox based on the settings in the profile.
3. The mail server responds by sending the items to the Worker.
4. The Worker sends smaller items to the Server. For large items, it sends the items' metadata and awaits instructions from the Server as to whether the item already exists.
- If it already exists, the Server notifies the Worker that it does not need to send the item over.
- If it does not exist, the Server notifies the Worker to send the item.
5. The Server updates the Retain database with the item's metadata if it does not already exist.
A good example of this is when User A sends message 1 to User B. When User A's mailbox is archived, Message 1 gets stored on disk with a record getting written in the database pointing to the file on disk and associating the message to User A's mailbox. When User B's mailbox gets archived, the Server notices that message 1 is already stored on disk and that a record in the database exists for that message. Now it updates that record and associates it with User B's mailbox.
6. The Server adds the item to the storage area on disk.
7. The Server launches the indexing process (if it is not already running) to begin the indexing process.
8. The Indexer indexes any items that need to be indexed.