1

What happens if I edit a file on my desktop PC, and edit the same file on my synchronised laptop which is currently not connected to the internet?

Let's say I have a file called "jobs.todo" in "~/Ubuntu One" on my desktop, and this contains the following:

Job 1: description
Job 2: description
Job 3: description

As I have my laptop connected to the internet, this file will appear on both computers.

I disconnect my laptop, and take it away with me on a journey. While I'm away, I think of another job I have to get done and add it to the file, which will now read:

Job 1: description
Job 2: description
Job 3: description
Job 4: description

When I get home, I go back to my desktop and think of something else I need to get done, so I add this to the desktop computer's "jobs.todo" file, forgetting that I'd already altered this file on the laptop.

This file will read:

Job 1: description
Job 2: description
Job 3: description
Job 5: description

and the file will be synchronised with the cloud soon afterwards, because the desktop machine is connected to the internet.

Some while later, I start up my laptop, it connects itself to the internet wirelessly, and synchronisation with the cloud takes place.

I suspect that the desktop version (with Job 5 in it) will be copied from the cloud, and I will lose the file containing Job 4, because the datestamp on the cloud's version of the file will be later than that on the laptop

1 Answer 1

4

What will happen is that when the laptop goes online, the server will tell it it has a new version of the file, and client (specifically syncdaemon) will notice it has a new version of the file also. This is called a conflict, and resolution is up to the client; what syncdaemon does is rename the locally-changed file to originalname.u1conflict, and download the file from the server to the original name. If .u1conflict already exists, it will try with .u1conflict.1, .u1conflict.2, and so on.

Right now nothing lets you know about the conflict; for 11.04 we'll be letting you know when they happen, and at some point (but not for 11.04) we'll be creating a little app that will help you resolve the conflicts. There isn't an automatic way of doing it, but we should be able to make it easy / userfriendly.

You must log in to answer this question.