I wrote this down as a Damus feature a while back. Microapp is great for this purpose too. Would microapp require nsec for DMs backup?
Discussion
Not sure. Need to familiarize myself with NIPs.
Depends on whether the micro app would need to be able to decrypt the DMs. The npub would be sufficient to identify and archive the DMs. The nsec is required for any app that wishes to read the actual messages. That functionality could be delegated to another micro app or the backups could simply be imported to another relay and Damus could connect to it to read the messages.