Nextcloud needs more backup restore options from sync

I had to restore an old backup of my Nextcloud instance today, which created conflicts with my files on the server vs. files in my sync directory. The major problem is I get “Keep Local Files as Conflict” and “Normal Synchronisation” as my only options. The first one will mingle my old and new files together as conflicts (creating conflicted duplicates) and the latter completely overwrites all my work from the backup, leaving me without an option to simply keep my local data and sync it to the server. I think there should be an option to say “Keep existing local data” or something like that. I tried emptying the directory on my local computer and placing the desired data into my sync directory but the same message appeared again. So in a nutshell, it appears I may have to wipe all my data from the server and upload the data again from each user.

This ties into the whole server is master for sync that’s come up a few times @tflidd @jospoortvliet

I understand that mentality, but there IS a “keep local files” option when you originally set up the desktop sync client which doesn’t appear to be a “server is master” thing. Unless I’m forgetting that the server files and local files merge together there at setup. The simplest solution for me was to entirely wipe user docs on the server and then select the sync directory of choice on the client side. Unless the code is written to strictly enforce “server is master” with no exceptions, I think it would be a nice thing as a recovery solution. Considering, if an employee selected “Normal Synchronisation” they would have wiped all their data with old information. I suppose the only current option then is to delete server data for the user and reupload, or since local == conflict files, delete the non-conflicting files and rename the conflicts to their original names

Yeah, Nextcloud doesn’t deal gracefully with this. If you restore a backup it overwrites files on the clients. You want to re-upload your files to the server and currently, manually is the only way to do that. It’s a complicated problem :frowning:

In my brief owncloud days it was suggested backing up the client synced folder and removing contents just before a restore, letting NC resync and copy the newer data back in to be uploaded.

Not sustainable for larger orgs, but for smaller user numbers it could work.

I think we need NC developers on the client first. There are tons of good ideas and feature requests on the bugtracker but without anybody realizing anything, we can continue sending our wishes to Santa Claus.


@jospoortvliet yes I learned that and thankfully not the hard way :slight_smile: I will be paying especially careful attention to that next go around! I think @JasonBayton is right that it’s fine for smaller client sizes (proved true here), but if they were using many many gigabytes of storage it would be a big time consumer. I genuinely wish I was a programmer because I’d contribute to all of this in a heartbeat

Correct. The two people who work on the client (Roeland and Harald, with some help from Mario) are exclusively busy with urgent customer stuff so sadly we haven’t been able to do much. We’re still trying to hire somebody :frowning:

Well I see the client is written in C++ and I’m consequently learning C++ for one of my own projects, so perhaps if I can get good enough I’ll see if I can try to contribute stuff as I learn :slight_smile:

1 Like