Unchecked folders will be REMOVED from your file system

If I understand this post, you are saying that once I create a sync folder connection, the Nextcloud Box takes over as the master and the client becomes a slave of the master? If that is the case, how would you sync a folder while excluding certain folders inside that one folder? Letā€™s say I have a folder in my main data share with a lot of DVD ISO images. I donā€™t want to fill up my Nextcloud Box storage with all that data, since I could if I needed to recreate those ISOā€™s at will.

Again I want to stress, this CANNOT be the way this works, or users will be losing files constantly and wonā€™t know why. NO WAY any solution should remove local files. The LOCAL files should ALWAYS be the master.

I think you donā€™t understand the concept of syncing. If you disable syncing for a folder, the local data is removed, but the data is still available on the server.
If you want to sync all data, donā€™t uncheck folders.

Thereā€™s no master and no slave in two way replication. The most recent data will be synced. If thereā€™s a conflict (you change the same file locally and on the server), you will have to resolve it.

Very well then. Why if I do the same thing on my Mac OS X client it does NOT delete the local files? And I stress again, NO SOLUTION should delete local files simply because a checkbox is unchecked. Try that with Carbonite. Same mechanism, only they do NOT delete the local files, they simply do not sync them to the server anymore. IMHO that is how this should work. If there is no way to get it to work this way, I have to scrap the whole project. Too bad because it looked so promising.

1 Like

Then thereā€™s bug in your MacOSX client. My OSX client deletes the files I donā€™t want to sync. If I donā€™t want to sync files, I donā€™t need nor want them locally.

As far as I know there is an exclude dir option, that allows you do just ignore certain directories in the sync process, which will not remove them locally, but I think that has to be done in the config files.
The developers can help you out there.

e.g. letā€™s say you have 200GB on your nextcloud server (under your account). with your concept, every client (laptop, work computer, ā€¦) would have to sync 200GB of data, even if only a minimal part is actually needed. what do you do, if you donā€™t have 200GB space on your local hard disk?

Either you like it or not, itā€™s just like the client behaves currently and we canā€™t change it here. There is however a longer discussion in the client bugtracker:

1 Like

Oh great so it is being considered. I put my two cents in there. Of note tessus, the people in that github post are calling the server the master and the local machine the client, so the idea IS that one is a master, and the debate is which side should be. It really isnā€™t a two way sync at present, itā€™s a one way sync and itā€™s in a direction most people do not expect.

1 Like

It depends a bit on the use case. If you have a large desktop computer with all your data, you might think so. But if you have several devices, smartphones, tablets, mobile computer, ā€¦ you want to sync all device but you donā€™t have all data on all devices. Then itā€™s clear to have everything on your Nextcloud server and only partially sync files.

And the ā€œserver winsā€ strategy is probably easier to implement since there is only one server. There can be several clients which can be temporarily disconnected to your personal cloud. But you can change files while you are disconnected. Now you work in a shared folder, two users make offline changes, the first being back syncs his changes, what should happen when the second one comes back online? Write over the changes of the first users? Currently, the first user has submitted his changes, the client of the second user will see that the files has changed in the meantime, it will sync the new changes to the client and keep the own modifications as a conflict file.

1 Like

Conflict Resolution is the hardest part about all this, but I think that whichever device originally owned the file at least should be able to keep it. If a file needs to be deleted and not resynched on a specific device, that device should be able to uncheck a folder or file, then the user can delete the data himself using that deviceā€™s file system and everybody wins. What I think most people are saying who encounter this, is that the cloud backup should NEVER delete files on the host. ANY host. It may have been much easier to implement the way it is being done, but itā€™s a product killer if the plan is to license this to other providers.

2 Likes

Nextcloud is no backup solution: Frequently asked questions (FAQs) around ownCloud

Being a sync solution and no backup solution might be part of the answer why the client does not work like you want it to. Nextcloud is a open source project, contributions to the code ideas etc. are welcome. But please read also the reasoning why the developers designed it the way it is currently. Sure it isnā€™t perfect, and there is also some discussion about it. And not everybody MUST like and MUST prefer it the way you do!

If you need more support and service, official Nextcloud support could be a suitable option for you. With the money you provide they speed up the implementeation of your preferred features.

1 Like

Hi all. I thought I had tested this and found out it only deleted server files, but I just deleted a userā€™s ENTIRE DATA FILE on the server, simply by unchecking the folder in the Nextcloud app. It even says that is what it is going to do, but I thought it was just a misworded thing. Turns out it REALLY WILL DELETE THE ORIGINAL FILES!

If this is just a bug, fine, it can be fixed. If this is the INTENDED BEHAVIOR then I must now remove this device from my network and NEVER EVER use it again. There is NO WAY a sync application should be DELETING LOCAL FILES!!!

Any help is appreciated.

2 Likes

Hi slylabs, when you say Nextcloud App, are you talking a desktop sync client? If so, which operating system is it for? If Iā€™m understanding you right, you go to a desktop client, uncheck a box so it doesnā€™t sync that folder and the files are being deleted from the server and the client? If so, I canā€™t reproduce this on my Linux sync client

Correct. It is running on Server 2008 R2. The sync completed successfully on Friday, so I came in this morning, and unchecked a folder that one of my AD users keeps his files in. This is shared from Server 2008 r2 server. After unchecking that folder and a few others, he told me that only 2 folders were visible. Upon checking I discovered that all but those 2 folders had been deleted from the serverā€™s actual shared folder!

I was able to download the files from the Nextcloud Box as a zip file (so then the files were NOT removed from the Nextcloud Box datastore) using the web interface and so was able to restore them, but now I cannot move forward deploying this.

Note that when I attempted this with my Mac OS X client, it did what you would expect, removing the files from the Nextcloud Box and NOT from my local desktop. Not sure why the difference. When unchecking a folder in the sync app, it DOES say itā€™s going to delete local files, but I figured that was just a problem with the way the warning was worded. Now I see that it means what it says! :slight_smile:

I just tested this again with another folder I didnā€™t care about. I watched as it ACTUALLY DELETED the files on my local system. Anyone in dev watching this?? How can I alert them of this situation? This makes this product a complete no go. No sync app should delete local files simply because I deselect the option to sync!!!

1 Like

You can go to the github page, I believe this is the one you want:

Iā€™m a bit confused about your situation however, as I havenā€™t had the Nextcloud desktop client delete files remotely. If I ever tell it to not sync a folder, it will delete the files on the local machine and they remain on the server.

1 Like

Here is some more background on this topic from the client bugtracker:

Your Nextcloud box here is the Nextcloud server, and your Windows server acts as a client (for the Nextcloud service)? You said you could recover it from the Nextcloud box, so it was not deleted on the (Nextcloud) server, right? So itā€™s the same story like your other post Unchecked folders will be REMOVED from your file system

If you want your Win-Server being considered as a server, you should perhaps use the external storage function. This way you can include storage from your windows server into the Nextcloud box (all data will remain on the Win-Server without being on the Nextcloud server. If a client connects through Nextcloud, Nextcloud has to fetch the data from your Win server). This comes perhaps closer to a solution you were looking for.

1 Like

Like @tflidd says Iā€™m assuming your network looks a little like this:

I donā€™t necessarily understand why youā€™d run it like this when you could push the client to endpoints directly, but that isnā€™t important here. What is important is the client works as intended, if you uncheck a folder on the client (which your Windows server is in this capacity) it will remove the files; you donā€™t want them synced, why should you have them wasting space on your client?

If OneDrive or Dropbox forced me to sync everything and didnā€™t allow me to uncheck what I didnā€™t want on my local machine, itā€™d be a pretty awful service.

If you do want them on the client, why do you uncheck the box? Theyā€™ll sync away forever between the NC box and the file server without question.

Entirely disagree. Thatā€™s the point of removing the sync relationship; you donā€™t want to sync the files. If you wanted to do a one-time sync, do so to a staging folder and copy them over to their final destination. Guarantees remote Box files canā€™t be modified that way too.

1 Like

Files that can be reproduced easily that take up a lot of space like ISO files do not need to be synced. Old user profile backups I may want to keep for a bit until I am sure the user has what they need, archives of old files that accounting doesnā€™t want to get rid of, but I know are of no use anymore, I can think of many reasons why I want the files accessible in my root share folder, but not taking up space on a cloud server.

I have reviewed several cloud systems. Absolutely none work the way NextCloud works. They canā€™t. No one would use them. No one would take the risk. There is a scenario where someone could uncheck a folder, delete the local files, not know what to do, and so delete the account on the nextcloud server, thereby permanently losing their files.

I am never going to convince developers there why this is such a bad idea, so I simply will not use this product. Thank you for you support in all this. I just wish it were made really clear before purchasing the Nextcloud Box and the Rasberry Pi that this was the case, but it wasnā€™t a very expensive experiment, and I was only testing to begin with.

Again thanks for all your assistance.

Bob S

1 Like

There is one thing: The sync client can ignore certain file types. So it doesnā€™t sync any of the ISO files but it doesnā€™t work on a folder basis.

There are two principal ways to do sync:

  • One is, you just sync the whole folder, everything within is synced on the server. On clients you can exclude certain folders or sync only subfolders to save memory. But everything is on the server and in doubt the server is master. This is the way Nextcloud works

  • Other way is to have a folder and you cherry-pick the folders you want to have synced on the server. So you keep the file structure on your client and you only sync a few folders.

I had the same problem that I didnā€™t want to sync everything to the server. So I decided I keep my file structure and I add a sync folder. Then I only put data into the sync folder of projects Iā€™m currently working on. Once they are finished, I move it back in my regular folder structure outside the sync client. It sounds a bit complicated but now itā€™s working quite good. On my mobile computer, I now have all files of current projects synced.

The first sync scheme is probably easier to implement in term of how to handle conflict files. So only need to do an initial sync and then you just keep track of the changes. In the second, there are some more questions: Do you keep the whole folder structure of the client, what if the folders are wide-spread over different disks. What if the folder structure between clients donā€™t match? If you exclude a folder from syncing and keep data, what do you do when you chose to sync it again. Should the client update the serverā€™s folder or the other way round. What if files on both sides have changed?
Your wishes are not impossible but they require some work on how to implement this stuff. On a community project, you can help to find a suitable way (for some things you donā€™t need to be a programmer). If you canā€™t do it yourself, you can put a bounty on a specific issue:
https://www.bountysource.com/issues/6189424-unchecking-synchronized-subfolder-without-local-delete
or get an enterprise subscription.

You donā€™t have to get involved and you donā€™t have to pay, you can just decide not to use it or a different solution. At some point there will be perhaps a solution and you might reconsider to use Nextcloud.

1 Like

This topic was automatically closed after 37 hours. New replies are no longer allowed.