How to avoid data loss??

(JD Evora) #1

Hi,

I have a laptop that I only use when I travel. I have syntrayzor installed and configured it to sync my work file-set.

The case is that this laptop can be turned off for months, my idea was to turn it on the day before I travel and let it catch up with the latest work files.

BUT it happen twice already, that the sync happen the way around, the Travel Laptop sent its old files to the other two machines in the group, meaning that I lost my latest version of a lot of files (I got them from an external backup).

Is Syncthing not prepared for this case? What could have gone wrong? How can I avoid this to happen in the future?

Cheers JD Evora

0 Likes

(uok) #2

Syncthing is for file synchronization and not a backup tool. If you “lose” files, you should rethink your backup strategy. You can activate file versioning on all computers to keep older/changed files but this is also not a replacement for a backup. If you then find a bug, please report back with steps how to reproduce the error.

0 Likes

(Jakob Borg) #3

There should be no difference whether the laptop has been offline one hour or one month, so there’s something else going on here. I don’t know what though.

2 Likes

(Simon) #4

True, but from @jdevora’s statement

I assume they are very much aware of that, as in could immediately recover from this problem as they did have backups in place :slight_smile:

Anything special about how these files are stored on the travel laptop or about the files/programs that use them? Otherwise one option to investigate the problem is to set the folder on the travel laptop to receive-only. Then when you reactivate from a long time of inactivity, (perceived) changes on the laptop do not get sent to the other devices and you get a notification which files are affected. Then you can check mod. times etc. in the hopes of finding why that happens. Once everything is resolved, you can switch back to send-receive.

2 Likes

(JD Evora) #5

My idea was to use it to SYNC my laptop, that has been off line for weeks with the current “global sync” status, not as a backup method.

The problem is that from what I can see, the sync happen the wrong way, the old files sitting on my out-dated laptop got sent to all the other systems like they were the newer ones.

0 Likes

(JD Evora) #6

There should be no difference whether the laptop Any clues about where to look at it? Is the logic describing how to determine the “newer file” described somewhere?

Cheers JD

0 Likes

(Russell) #7

Could it be that the laptop has ‘lost’ the real time of its files because the bios battery has failed? It had been off for a very long time.

0 Likes

(JD Evora) #8

Could it be that the laptop has ‘lost’ the real time of its files because the bios battery has failed? It had been off for a very long time.

I could happen… But when I looked at it, it already recovered. That would make the files “from the future”…

But one of my servers is a Raspberry Pi, that doesn’t has a real time clock and I never saw that issue on the Pi.

A corner case to look at, for sure.

JD

0 Likes

(Simon) #9

Syncthing does not depend on the clock/time to decide which file is newer unless there is a conflict.

0 Likes

(JD Evora) #10

Syncthing does not depend on the clock/time to decide which file is newer unless there is a conflict.

What is the method then? Because it looks like that was what didn’t work properly.

When the system came online, its version of the files, that had the content from 2 months ago, was considered the newer version and was sent to all the other devices as the newest version of the files, overriding the files already there that had modification in those 2 months.

Cheers JD

0 Likes

(Simon) #11

Very, very briefly: It’s a set of counters for every device: Whenever a device sees a change of the file, it increases it’s own counter. The version with the highest wins.

0 Likes

(uok) #12

maybe after update something happens to the counters?

0 Likes

(Simon) #13

No, after update the file index gets retransmitted, but the underlying data in db including counters is the same.

0 Likes