michelesalvador / FamilyGem

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

Option to export ALL trees #123

Open aaannndddyyy opened 10 months ago

aaannndddyyy commented 10 months ago

As long as there's no automated local backup, a way to export ALL trees with all the data they contain would be handy. Basically a manual backup of everything you have in family gem so that you could uninstall family gem , sell the phone take a new phone , install family gem and import from backup file and be exactly in the same state you were when you made the backup

aaannndddyyy commented 9 months ago

This is closely related to #122

jer194 commented 9 months ago

You can use generic apps like NeoBackup for that ...

aaannndddyyy commented 9 months ago

Afaics, this requires root

jer194 commented 9 months ago

You are right, it requires 'root' rights. Indeed such an option could be handy if there are many trees. Is it really a common use case to have many trees which are continuously being changed?

aaannndddyyy commented 9 months ago

I guess it's not. I can't only speak for myself. And I had several. One use case , if you only work on your tree is that if you have remote parts of the family that don't agree with sharing with everyone or don't want unneeded stuff, you make a small tree for that branch and a small tree for another branch , hand them out to them to complete them hand them out to others of the same branch to further add more , and you can then merge them locally for yourself

michelesalvador commented 7 months ago

Yes, the option to export all trees at once is strictly related with #122. I see now a single solution to all these issues! In Settings a new button: the Backup manager, that brings to a new activity with two sections: Save and Restore (or something).

In Save there is a list of all trees, each selectable to be exported as ZIP backup in a folder chosen by the user. Selected trees can be exported all at once in this folder just choosing it the first time. Next times the process can be made automatically periodically, or just pressing a button Backup now to the same folder. This folder could be local or on cloud, the choice it's up to the user.

In Restore the backup trees could be restored automatically just pressing a button Restore all trees from the same folder, or selecting a folder from which to get them. Maybe with an option: Overwrite existing trees or Add to existing trees.

The target of backup will not be a file, but a folder. At the beginning this backup could be pre-set automatically to a default local folder. I like this solution because the ZIP files involved would be the same already used by Family Gem with Save ZIP backup and Recover a ZIP backup.

What do you think about?

aaannndddyyy commented 7 months ago

Yes, sounds good. For restore it could ask whether all from that folder or select one. For automatic, it could save them under a given name, let's say the name of the tree is ABC, then it could save it as ABC_autobackup_xhqc_202402101018.zip Where xhqc is some unique identifier of your tree , as you can have two trees with the same name, or you disallow letting the user name two trees identically. The identifier could simply be the number of your tree in the list. If you have an empty tree list and restore all is good, but if you restore while you still have trees and select add instead of overwrite, then the numbering will change. But already the next autobackup should then backup with the new numbering and every should be fine.

Optionally: Then when auto backup runs, it checks for xhqc and sees if it has three of them , if so, it saves the new one and then deleted the oldest one

aaannndddyyy commented 7 months ago

It could also just use whatever the current backup uses and just add an option to backup locally. Could just be one zip file of the entire family gem working directory