There is no time triggers in MongoDB to do this action by default.
Here are a few workarounds:
1. Background Service Archiving
You can use a scheduler to run repeatedly (let's say every 5 minutes) and checks for documents in the active_posts collection which have passed their TTL, then transfers them to your archived_posts collection.
Read the following Stack Overflow post to find some scheduling libraries for Node.js:
Is there a job scheduler library for node.js?
Here are some libraries to name a few: node-cron, node-schedule, Agenda, ...
2. Scheduled (Delayed) Archiving
You can schedule the archiving job for each document at the time of creation.
In addition to libraries mentioned above, you can use Kue which has an option for scheduling a job to be done once in a certain time.
TIP:
MongoDB has a built-In functionality to delete documents after they pass their TTL, you may find it useful in conjunction with these methods. But use with caution!
You can read about it in the official documentation, and in the following Stack Overflow post:
Delete MongoDB document at specific time