Export/backup single chat

Background:
Someone deleted a chat accidentally. To get lost information there should be a possibility to backup/export (undo) a full chat and import it again.

Request is:

  • a function to export a chat to a single file (chat-backup-file)
  • a function to import that chat-backup-file
  • it should be possible to import that chat-backup-file at any DC installation (!)

When someone losts a chat completely (e.g. friend1) there is always a second backup at “friends device” (friend2)!
So the best approach would be: friend2 exports the desired chat at his device, transfers backup file to friend1 and import there ==> done :slight_smile:

(I saw that there is a PR existing yet, which goes in that direction)

The mentioned pr is to export a chat for archiving it or using it as proof/evidence similar to the export chat history feature in Telegram or WhatsApp. It does not contain importing it again.

But there was an idea to share chat history (complete or last x messages) in groups when adding new members, that feature goes in a similar direction to this idea,

Possible workarounds for now:

  1. Lost messages are lost, do nothing.
  2. Forward only important or all messages to same person (downside, own messages also appear to be send by the other person)
  3. import an old backup / or fake the time of the last seen message in a new backup so the messages get re-fetched/downloaded.
  1. I agreed that with my friend yet. That’s the only idea which I had too.

  2. May you explain how to do that (fake the time of last seen message) and what are the consequences?
    (backup is not existing!)

workaround 3 should not have negative consequences, but a backup before can’t hurt. The process is described at Process old emails once again

Basically its export a new backup, open it with SQLite Browser then change the uid validity value of all folders:
config table “imap.mailbox.INBOX” and “imap.mailbox.DeltaChat” set both to 0:0. (if the number before the colon is already 0 change it to sth. else)
then reimport the backup and wait until new messages are fetched.
[if your using a brand new version the backup might already be a tar file, that contains the sqlite database]

Ok that’s tricky. My friend isn’t able to do that.

But thanks for explaining.

Another way:

  1. Rename DeltaChat folder into DeltaChat.old or something in the web interface or in Thunderbird.
  2. Wait for Delta Chat to create DeltaChat folder.
  3. Move all messages from DeltaChat.old to DeltaChat. They will appear to Delta Chat as if they were just received.

But this is also tricky because you need all the messages to be on the server somewhere. And if you have new messages in the chat, all the messages moved into DeltaChat folder will appear below existing ones, so you probably want to delete the chat again before doing it.

Unfortunately that’s not possible because we are on Android :wink: