"Ignore" a local folder instead of un checking sync - avoid deleting local folders

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.

2 Likes

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

Thanks that can help. Your proposed solution of an ignore button has been discussed before and I think it’s a good one.

Bob S

@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.

1 Like

FYI, Here is the issue I made at github

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 -

  1. 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/?

  2. 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:

  1. 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).

  2. 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.