Backup export/import to/from external sd card (android)

As I’m using DC for years now, so chats including it’s file blobs need more and more storage space. For normal operation this is not an issue but when I want to make a backup, this is not possible any more!

At the beginning backup import was a problem, because of extensive memory consumption of standard method. But this is solved (for me) with a different backup file format.

But now export of backup is getting the issue! All internal memory of the device is not sufficient to store the application AND the backup file!
The only back door now is in deleting some (many!) messages. But as I want to preserve them (cannot archive a chat or a part of it) I’m running into a serious issue.

Expected behavior

A solution could be to store the backup file at external sd card of the device. This would guarantee a way to do the backup regardless of the device’s storage situation.
(Backup import vice versa should be possible from external sd card too).

Actual behavior

In the moment only internal storage is used. For DC app and backup file. This would lead to a dead lock situation, where backup is not possible any more.
When user runs into this situation, deleting of messages is the only way :frowning:

2 Likes

Did a tweak where I changed the target dir to external sd card. See here:

I tested this with my samsung S3 at Android 4.1.2 and it works properly :slight_smile:
In my case the target dir is /storage/extSdCard

Any comments welcome.

Now I did a first try to do a full backup to external sd card. It works properly, but I feel the whole process is obviously slower than with internal storage.
The resulting backup file has a size of around 2GB and it has been taken around 2 hours for doing.

I think for next steps regarding this feature it’s better to move to github.