michelesalvador / FamilyGem

Android app for genealogical trees
https://www.familygem.app
GNU General Public License v3.0
114 stars 32 forks source link

Help all trees lost #121

Open aaannndddyyy opened 7 months ago

aaannndddyyy commented 7 months ago

Hello!

So I had several trees. Own tree where I have worked long hours and many days with several family members. Trees for other people.

I was adding two photos to a person's profile in one of the trees when family gem crashed, probably because I ran out of internal storage space .

I thought ok it crashed so I cannot add that photo now I must first make some space. But no, when I opened family gem again, ALL trees are gone with all the info Tree data, names, dates , photos, notes....

And no I'm don't have a copy on Google cloud because I don't like having personal data in the cloud.

Is there a way to rescue them?

Screenshot_2023-12-06-21-19-00-053-edit_app familygem

jer194 commented 6 months ago

I guess that is an exceptional situation, which FamilyGem (and no other app) is prepared for. If you have root (either via Magisk, or something), or via Recovery, you could check the files in /data/data/app.familygem/files:

ls -al /data/data/app.familygem/files/*.json -rw------- 1 u0_a454 u0_a454 1615265 2023-08-25 07:25 /data/data/app.familygem/files/5.json -rw------- 1 u0_a454 u0_a454 217697 2023-08-25 07:27 /data/data/app.familygem/files/6.json

Images should still be in the directories from where you have imported them. Image references are in those json files.

aaannndddyyy commented 6 months ago

Sorry, no root here. I wonder why all trees are affected and not only the one that I tried to add the photo to. I have not dared to open the app after the first opening when I saw all trees with 0 , because I hoped there's some recovery mechanism.

Since apparently this does not exist, I strongly encourage to implement one. An easy solution would be autobackup. If at any time the files you're working on get corrupted or delt d , and you cannot access them, then you can always restore from backup

michelesalvador commented 4 months ago

@aaannndddyyy What happened is that you lost the app settings file (/data/data/app.familygem/files/settings.json). Probably this file was corrupted (not adequately saved) during a media file import. It's bad but not such a disaster. As you already noticed in the meantime, trees are still there. Family Gem automatically recreated the settings file with all numbered JSON files found in /data/data/app.familygem/files/##.json. "0 persons" simply means that a tree has never been (re)opened.

What you have lost for each tree is:

If you shared some of your trees, by losing the share history you can no more automatically sync these trees with those updated received back. There is no more connection between your trees and the shared ones.

An automatic backup system is already implemented.

aaannndddyyy commented 4 months ago

I lost one entire tree, the others were still there after opening showed the correct numbers again, just lost their names. Screenshot_2024-02-10-04-48-21-413-edit_app familygem

Luckily had not shared. I don't do cloud, so some automated local backup option wouldn't be bad, could be rotating to just always keep the latest three versions, so if last version corrupted, I could go back to previous. And if I am really unlucky and immediately spoil that one too, I still have as a last resort the third, which I'd then manually copy somewhere else before I try opening it again