Given the angst and number of posts related to unchecking a sync folder in the desktop client resulting in deleting that local folder I offer not so much a solution but a work around.
Pause the sync. Navigate to the general page, click on Edit Ignored Files button and add your folder with a following / to the list. Then resume the sync. You will no longer see the folder in the list. It wonât be synced nor deleted.
If you do that immediately after first creating the sync there will be less issue. Do this INSTEAD of trying to un check the folder sync. As many have discovered if click âapplyâ that it will delete your local folder.
Itâs been awhile since I was on dropbox but I think they had an âignoreâ box for folders. If the nextcloud client simply changed the action of the checkbox next to each folder to âignoreâ and that simply added the folder to the 'ignore list" and only âgreyedâ the folder instead of removing it from the list then that would be closer to other services and more to users expectations. In the meantime I give this workaround
That done the current âsyncâ checkbox would then not really be necessary. An ignored folder is as good as a disconnected one. To get the same result you would allow it to sync, then âignore itâ then delete the folder if you still want to.
For changes in the client, feature requests and so on, it is better to discuss this directly with the developers on github.com/nextcloud/desktop/issues
@tflidd Seems itâs been discussed plenty. The devâs are aware of issue/feature going on a few years now. Whatever their reasons they have decided not to add/address it. I will though make another issue and link this post.
I think most basic userâs use case is they just want to sync their entire âhomeâ directory . That way as they work they donât have to think âdid I just put/backup that in the cloud?â. In a perfect world of unlimited free cloud storage and giant bandwidth thatâs what weâd all do. But like me they have maybe a folder of huge video files or a folder of sensitive stuff, whatever they donât want to/canât sync.
Since I saw no post of my work around only pain I just offered this here for new/noob users who probably just assumed this feature existed (i.e. ignore one or more folders in a parent folder being synced) and were instead surprised that they just deleted a folder for which they may not have had a backup (poor planning on their part!) by mistakenly clicking apply despite the warning.
For new users reading this you should know that it is possible to set a sync up for each individual sub folder in a parent thus effectively âignoringâ some. Yet if you had say a dozen or more it gets ugly having to make a remote folder for each and the client window gets crowded and confusing. Of note any file in the parent root will not be synced by this approach.
Clearly at a certain point itâs easier/better to sync the whole folder and then indicate which folders/files to ignore like for example a videos folder with HUGE video files. When you do that nextcloud makes all those (sub)folders for you on the server (very convenient)
I personally would like to see this feature mostly for others (like my family members who use the cloud I set up) because they may not understand all the limitations or best practices for managing their files nor when to take a serious warning seriously. When I set each of them up I had to do it personally because of the danger that they would delete files. The lack of this ignore feature (or the uncheck = delete âanti-featureâ if you will) is a tech support nightmare (as has been pointed out). Several sysops posted they decided to pass on nextcloud only because of the super headaches created by this dangerous client âanti-featureâ
I suppose the lesson like most coding lessons is code to how users use it not to how they should use it.
I chuckle a bit at the warning message âlocal file systemâ most users have no idea what a âfilesystemâ is let alone the nuances of a âlocalâ vs âremoteâ. They will just click âapplyâ because well they thought (and maybe rightly) that unchecking it would simply not put that in âthe cloudâ. They are used to checking a check box and then clicking delete (which is what you do in the browser interface) not unchecking something and having it be deleted.
Well in the end this is not a problem for me. I have my work around and I only need support a few users. Still I hope they do something as having a community edition is dependent on having a viable enterprise version and this âanti-featureâ isnât helping the bottom line IMHO.
I donât expect much traction here given this has been a known issue/feature request for some time. Still the moderator at the forum requested I make an issue based on the work around I provided there. Rather than repeat all the details I refer you to the forum post.
The feature request is to make the current folder check box work in a different way. Have it ignore a folder for syncing instead (as I do now but adding it to ignore list). If one wants the current functionality you just allow it to sync first then uncheck it to âunlinkâ it. Then if the user! decides they can then delete those local files/folders knowing that a copy is in the cloud.
Thanks so much for this workaround. I will have to try this. I was so shocked about this message, could not believe that the client would delete files on my laptop. I just It just wanted to unckeck a folder as I am running out of space on my server (VPS). I was about to ditch the Nextcloud client! It seems the devs donât care, so I am happy about this workaround
What if I want to ignore a subdirectory called âdownloadsâ from Folder Sync A, but not from Folder Sync B (which also contains a subdirectory called âdownloadsâ).
If I put the subdirectory name in the ingnore list, wouldnât it be ignored from ALL folder syncs?
Yes, on the global ignore list it will match all downloads/ folders, if yo omit the forward slash I believe it would also ignore a file which has the same name, though it is not likely on windows as there is usually an extension like .txt on the end.
I am unsure if the client accepts backslash, I have requested more detail on the help pages for this because for many years I was just copying the entire path from Explorer, which uses backslash, and expecting it to work but I am not sure it works at all like that! oops
Thanks for this method dkebler. Can you clarify the following -
To ignore a syncing a sub directory is the required ignore list syntax the complete path to that sub directory? An example would be directory ~/A/ contains ~/A/B/ and ~A/C/ and it is desired to stop syncing ~/A/C/ then would the correct ignore list syntax be C/ or ~/A/C/?
Assuming the ignore list syntax for the example in â1.â is C/ and there are two sync connection ~/A/C/ and ~/B/C/ would C/ be ignored in ~/A/ and ~/B/?
Just if anybody else stumbles across this thread and wonders what the answer for this question is:
To ignore a sub directory, add just the foldername with a trailing /
This will ignore all folders with this name (e.g. âMicrosoft/â will ignore alle folders named âMicrosoftâ in all subfolders).
C/ would be ignored in A/ and B/ (unless you specify like this âB/C/â or âA/C/â)
If you have several folders with a certain name and only want to ignore one you can:
a) enter the full path relative to the sync job (e.g. you sync âE:/filesâ and want to ignore the folder âMicrosoftâ in the subfolder âE:/files/stuff/osâ enter âstuff/os/Microsoft/â)
b) enter the parent folder and subfolder (e.g. âos/Microsoftâ)
Beware that removing folders from the ignore list seems (at least in my case) to not trigger an upload of all the content. I needed to change the content of a previously ignored folder to trigger uploading.