The issue is caused by document that are missing a creation date when an archive condition "older than xxx" is used.
Typically calendar updates from external sources are affected, I suspect a bug in the iCal conversion routine.
@Alexander:
Using "not modified for 6 month" will work fine for you, you don't have to worry about old calendar entries being archived. The only difference is, that the cut-over date is less precisely calculated.
Using "older than" or "not modified for" makes basically no difference. Anything older than the cut-over age is archived, which is simply calculated in a slightly different way.
Being archived does not imply being deleted from the archived database. To be deleted after an archive run, the document must match several conditions:
- It must not have child documents that are not also archived (replies, calendar repeats and so on),
- It must not have a $NoPurge Field set. $NoPurge contains a target date how long the document is required in the database
- It must not be a design element, ACL entry or profile document. These are always archived and never deleted.
Stationaries, rules, documents marked for follow-up, repeating calendar entries and other persistent documents have $NoPurge set to indicate the earliest possible archiving date.
In your example, the repeating calendar entry will be archived after 6 months but not deleted prior to its end date plus 6 monts (the time set in the archive condition). You simply find it in the main db and in the archive simulaneously.
However your script is helpful to fix affected databases. Since you permanently have to monitor the archive process for "entry not found in index"-errors, I prefer to use "not modified for"-conditions.