stingle / stingle-photos-android

Stingle Photos is an open-source, end-to-end encrypted media gallery application that provides backup, sharing and cross-platform sync functionality without sacrificing convenience.
https://stingle.org
GNU General Public License v3.0
308 stars 28 forks source link

Add a local backup/restore option of the encrypted media #35

Open mario-g98 opened 3 years ago

mario-g98 commented 3 years ago

I love your app! Would it be possible to add the option to import and export the encrypted database locally on the device?

alexamiryan commented 3 years ago

Hello Mario, You mean to export all your photos and videos locally in an encrypted form or you mean just the local SQLite database?

mario-g98 commented 3 years ago

Hello Mario, You mean to export all your photos and videos locally in an encrypted form or you mean just the local SQLite database?

I mean all the photos and videos.

alexamiryan commented 3 years ago

This feature will fit nicely in a desktop version and we will definitely have it, however to have an export on a mobile version doesn't make sense. Your library will grow to terabytes after some time and no phone have so much storage capacity.

mario-g98 commented 3 years ago

I see your point, but it will be nice to have the possibility to transfer the backup directly from my phone to my NAS.

alexamiryan commented 3 years ago

So the idea is that Stingle cloud is your multi site, redundant and secure NAS. It's built with that in mind.

rthellend commented 3 years ago

So, you won't allow local backup/restore on a phone? It seems like pretty basic functionality.

Your FAQ says:

I don’t want to backup my stuff, I just want to encrypt locally. Can I do that?

Absolutely. You can turn off backup functionality in settings and you can use Stingle Photos just to encrypt and store photos/videos locally (just like SafeCamera used to work). You will be limited by the storage capacity of your device. All photos/videos that are in Stingle Photos gallery are encrypted and protected from other apps or people.

SafeCamera certainly allowed users to make full local backups of the encrypted days.

Without local backups, this app can't be used reliably, even with cloud backups. Just imagine someone traveling or with limited bandwidth. What's going to happen to their hundreds of gigabytes of pictures and videos of they lose their phone?

With local backups, at least they could copy then to an external sdcard or something.

alexamiryan commented 3 years ago

Oh, I probably didn't get the question right. Of course you can, just select any number of photos/videos and click on the open lock icon on the action bar. If you long press on the action bar items you will see their captions.

photo_2021-02-16_03-59-46

rthellend commented 3 years ago

I think the idea here is to make a backup of the encrypted data, i.e. export the encrypted files to external storage such that they could be restored if the phone dies or the app is reinstalled, but keep them encrypted the whole time.

mario-g98 commented 3 years ago

I think the idea here is to make a backup of the encrypted data, i.e. export the encrypted files to external storage such that they could be restored if the phone dies or the app is reinstalled, but keep them encrypted the whole time.

Yes, that was my idea. Maybe I need to change the title a bit.

alexamiryan commented 3 years ago

I think the idea here is to make a backup of the encrypted data, i.e. export the encrypted files to external storage such that they could be restored if the phone dies or the app is reinstalled, but keep them encrypted the whole time.

So that's why we have a backup functionality, it just backs up encrypted files and you can always get them back if your phone dies. I am sure this is not a practical feature for the mobile app, as you library can get to huge sizes after several years. This feature you will automatically get on the desktop version. You will see folder with encrypted files and you can back it up manually if you want.

rthellend commented 3 years ago

And if the phone dies before the files are uploaded to the cloud?

alexamiryan commented 3 years ago

And if the phone dies before the files are uploaded to the cloud?

That's not something we can cover. What if your phone dies in the middle of taking a video for example?

rthellend commented 3 years ago

I think you're being purposely obtuse. If you don't want users to be able to backup their data without first going through your cloud service, just say so.

But, if you want your app to be usable without a fast internet connection or without using your cloud service, local backups are a must.

alexamiryan commented 3 years ago

I think you're being purposely obtuse. If you don't want users to be able to backup their data without first going through your cloud service, just say so.

But, if you want your app to be usable without a fast internet connection or without using your cloud service, local backups are a must.

No that's not the case. We want it to be as convenient as possible. Just having it on the mobile doesn't make much sense. This feature will be certainly part of the Desktop app.

nep2ner commented 2 years ago

I could see this feature being useful for certain use-cases. For example, if a user doesn't auto-import their photos into Stingle but instead just imports/captures a few select photos. In that case, it would be very convenient to allow the user to export an encrypted backup that they can decrypt with their private key on another device. Maybe allow a user to export the local encrypted data if it is a reasonable size? Or maybe allow a user to manually select photos for encrypted export, similarly to the currently supported "decrypted export" function.