Comment on page
The person I want to sync with has deleted valuable data
As you know, when synchronizing with another Mapeo user, ALL DATA is shared in both directions. When you sync with someone, you will receive all of the observations on their phone and they will receive all of your observations. All edits and deletions that have been made to data will also be transferred to the other device during sync. For example, if a person deletes or edits an observation and then syncs with other devices, this observation will be deleted or edited on all synced devices.
- Let's give a practical example:
It can happen that someone misunderstood the behavior of data syncing and deleted some of the data they collected in Mapeo Mobile after having synced with their peers, thinking that data would already be safe in a central database. This is not how Mapeo works. What will happen is that the data you delete on your phone, will be deleted from everyone's phones after syncing with them.
- How to prevent the data deleted on one device from being deleted from other devices after syncing?
There is a work-around to prevent this, but it can be very time-consuming. Mapeo sync works under the premise that if multiple users edit the same observation before syncing with each other, the changes that will prevail after syncing are the most recent ones.
Knowing this, before syncing with the person that deleted the data, you can explore your database in Mapeo Desktop, identify the observations created and deleted by the person that deleted data, and make a small edit to each of them. After that, sync your Mapeo Desktop device with the other person's device. This way, after syncing with the person that deleted the data, not only will your data will not be deleted, but the person that deleted the data will get the data back.
Here you have an example of an activity that you can practice with your team to clarify this behavior:
This activity shows which edits take priority when synced data has been edited on multiple devices.
- 1.First, you need to have all participants create observations and sync with each other.
- 2.Once all participants have synced and have the same database, one of them deletes one of the observations they created for training purposes.
- 3.The team verifies that the observation has been deleted and after that, the participant syncs with a second participant.
- 4.Right after, a third participant that still has the complete database, edits the observation that was deleted by the first participant.
- 5.The team verifies that the observation has been edited and after that, the third participant syncs with both the first and the second participants.
- 6.After that, everyone verifies that the deleted observation reappears on their devices with the changes made by the third participant.
- 7.Discuss the need or utility of this workaround to avoid losing your data when you know you are going to sync with someone that has deleted data.
- How can you prevent this from happening again?
Mapeo sync can be a tricky and complex process and the functioning of the peer-to-peer database is not always easy to understand. It is important to create project synchronization protocols to ensure that all data becomes part of the project database. For more on that, see Creating user protocols.