Restoring files after rescan messed up timestamps?

Hi all,

I had a drive issue with my main server, resulting in that I had to restore a backup of all the user files. For some reason I did a occ rescan which - I Think, or if it was because of rsync - ended in all of the files’ timestamps where removed.

No files has a created date - except them after the rescan. All files are modified on the same date.

Now, I wan’t my timestamps, and the other meta data. Also all clients, of course, started to re-download all of the files that where already on the client’s Machines.

So now I am thinking about restoring the files once again - making sure that the timestamps are still intact. I do however have a few questions:

Files that are modified or created AFTER the previous restore; what happens to them? How will the client prioritze the files that are modified after the files on the server? Will they be overwritten on client or server?

Do I have to run the occ scan again? How do I make sure that it does not touch the created timestamp metadata?

I might try to just recover the meta data without modifyting the files’ content. Any ideas are welcome, but I did find this:

Nextcloud version 12.0.0:
Operating system and version Ubuntu 16.04):
PHP version 7*:

For this purpose you can set new eTags with the fingerprint-command:

With a new eTag, all files are considered to be newer on the server and will be redownloaded by the client. If you want to save change made on the client since the backup, you should backup this folder before.

Thank you. However, I would rather have the clients Not downloading the files again. I want to restore a previous backup, with all the metadata intact, so that the client’s files and the files on the server are the same - with the meta data. I have asked a few of my clients to pause the sync untill I have this resolved. Rather, I would like the clients to re-upload the files to the server.

I’ve made a small test. I have a test account that has messed up meta data. Set up a sync client. I restored it’s files to the earlier backup - pre-messed-up-meta-data. Then I did a occ files:scan of that account. Now the files was re-downloaded but with the “correct”/restored meta-data.