Server restored - and deletes/overwrites new local files


I migrated my NC-server (VM in a debian host) to another server during the past days. The movement of the data and the restoring process took several days, in which the server was offline. This was not a problem, since I am currently the only active user. No changes were required on client-side due to the migration.

During the offline-days, I changed files in the “to-be-synced”-folders on the client side (Manjaro). I expected that once the the server is back online, the client would notify me about syncing conflicts and asks me, which files I’d like to keep: the old ones from the server, or the new ones on the local side. Unfortunately, this did not happen. My updated local files are gone, and I got old versions at both ends instead.

I searched the trashbins on server- and client side: no trace of my recent edited files. The client shows me this:

When I click on the files, I only get the old versions.

I managed to restore the files from a backup - with minimal lost. But I’d like to understand what went wrong. What should I have done to avoid this? Any chance to get the latest versions of the files?

thank you for your suport.

Did you maintain the timestamps on the server files during the transfer?

Hi, I suppose you forgot to run maintenance:data-fingerprint after the restore?

I have to correct myself:

The files I created while the server was offline are actually completely gone. So they basically got deleted from the folder on the client side, once the server went online.

Files that already existed prior migration show e.g. a “last modified: Thu” on tje client side. These files have been edited frequently during the past days. Once the server came online again, they have been overwritten with old versions.

Sorry for the confusion…

yes, you are correct.
Does it make sense to run the command today?

The command would have prevented the problem that you were experiencing.

If I understand this correctly, the content of the link is mostly about restoring from a Nextcloud backup. This is not what I did. I moved the entire host as a VM. So expect from the offline-time, nothing happened that NC (server and clients) would be aware of. Only the host of the host changed.

So at what point exaccly should I have run the fingerprint-command? Attempt for a proper procedure:

  1. Migrate the VM.
  2. remove the network from the server
  3. start the server
  4. put in maintenance mode
  5. run the fingerprint command
  6. enable the network, so the clients resume syncing.

Is that correct?

yes it is :+1:

If all you did was relocate the existing VM to another host, no changes would really have been made on the VM that would necessitate a restore procedure.

What I took from your original post was that you migrated Nextcloud from one VM to another server (a physical server or a different VM).

So what did you actually do?

Maybe the choice of words was not precise enough. I actually created a backup of the entire virtual machine, and restored this backup on the destination sever. The vm contains NC installed on debian.

Sorry for the confusion.

If all you did was relocate the existing VM to another host, no changes would really have been made on the VM that would necessitate a restore procedure.

Well, obviously I lost data. So I should have followed the procedure above.

Thank you both very much for your feedback!