You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Editable default values for folders, devices #4224
enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
When new folder is created/added various advanced settings have a default values (rescan interval, pull order, versioning, etc.)
Making these defaults editable would help a lot to streamline deployments.
Usually I use a custom values for the above, but they are always consistent per machine:
For example:
On a file server: certain rescan rate, specific versioning scheme.
On a mobile clients: other rescan rate, other versioning scheme.
And for every folder added to any of the devices there are many clicks to set the corresponding parameters.
Allowing to "save current settings as default" (or something like that) will save a lot of time and improve UX.
(also, the back end for this will be useful once "auto-accept folders" is a reality)
Reacted by Zommuter, Michael Muré, Jakob Borg and Chris [scuba.tech]
You should really use the rest API in my opinion. The defaults are there for common use cases. If your usecase is not common, you should use the rest api.
Is there any practical reason that the defaults have to be hard-coded in Syncthing itself and can't be loaded from the config? Yes, this isn't something that would be a super common case, but there are all kinds of perfectly legitimate reasons to want some way to specify defaults for a device in otherwise regular use cases.
There isn't, but I'd argue that you already have a way to modify the defaults, that is by specifying a non-default value when creating the folder. Defaults currently exist in both Javascript land and Go land, so I question the implementation complexity of achieving this versus just calling the API with the values you actually want. Also, what happens if you created a folder with defaults and change the value of a default, are we going to have users expect the value on the folder to change too? I guess we'll have users in both camps and someone will always be left unhappy.
I vote close as wont-fix, as this makes things ambiguous, and just leads to unhappy people just in different ways.
Defaults need to live somewhere, for example we use them when creating the initial folder before there is a config, and when they are missing from the config itself - e.g., if someone hand added a folder with just the id and path into the config.
I'm not absolutely opposed to having the GUI get the defaults as an object from the backend, and the backend reading them from the config, with the config having (hard coded) defaults if that section is missing.
But I also don't think most users spend so much time adding folders that this is a big deal either way. So from my point of view, `enhancement`, `unplanned`.
I recently started moving over from resilio to syncthing - and find this to be an essential missing feature adding much frustration to the migration process.
Bear in mind I am synchronising 8 Devices with 18 Folders. 3 Devices don't have all the folders (mobile phone and storage-limited laptops for example):
2x servers (sites A+B)
3x desktops (sites A+C)
2x laptops (mobile between A+C, occasionally on site B)
1x mobile phone
The proposal to use the API is usable by developers. But long-term the majority of the user-base will not be developers. In my case including configuring the first device, I have to hand-configure ~105 folders to sensible values for my use-case. Maybe now that I know there is an API I will look into a more automatic way to set this up for the remaining folders I was too lazy correctly to configure the first time around.
Many of the default settings are silly for specific situations. Examples:
Inotify not enabled by default where it is available
Very short rescan interval despite having inotify available[1]
Share With Devices - a "master" device/server might be desirable to have as a default peer for all folders.
File Versioning disabled by default - not all users have decent snapshot/backup schemas in place. Some users are likely to use syncthing as part of a bigger backup strategy and will want this enabled on every folder by default.
File Pull Order - set to "Random" by default. This isn't a big issue for an already-fully-synchronised Folder - but for a new peer it makes sense to have a preference.
1: Rescan becomes pointless/inefficient if inotify is available
Inotify is still technically experimental, hence it not being enabled by default (and IIRC, being controlled only through an advanced option right now), also, I don't think there's currently any way to vary the default sync interval dependent on other conditions. Additionally, rescanning is only pointless if using inotify if you trust it to reliably catch everything, which at least on Linux it won't (if you have enough changes happening fast enough, events can and will be dropped), and you at minimum need to rescan on startup because you have no proof that nothing changed since you last ran.
As stupid as it sounds, a random pull order actually is near optimal for an initial sync situation too, provided you have a single source and multiple systems syncing from it and you have equal (or near equal) bandwidth between all nodes. This is the case for the exact same reason that randomizing the block fetch order in BitTorrent downloads gives the best performance, although the effect is more pronounced there because it selects blocks randomly instead of files.
Re random for initial sync, it is highly dependent on your use case. For example, if you are storing millions of photographs that you need to work with, you might want to prioritise the latest photographs over the oldest - or psosibly the opposite. This matters most when synchronising for the first time and when there is a new large dump of content. For minor content changes, the pull order doesn't have a significant influence.
enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
Activity
AudriusButkevicius commentedon Jun 20, 2017
You should really use the rest API in my opinion. The defaults are there for common use cases. If your usecase is not common, you should use the rest api.
Ferroin commentedon Jun 20, 2017
Is there any practical reason that the defaults have to be hard-coded in Syncthing itself and can't be loaded from the config? Yes, this isn't something that would be a super common case, but there are all kinds of perfectly legitimate reasons to want some way to specify defaults for a device in otherwise regular use cases.
AudriusButkevicius commentedon Jun 20, 2017
There isn't, but I'd argue that you already have a way to modify the defaults, that is by specifying a non-default value when creating the folder. Defaults currently exist in both Javascript land and Go land, so I question the implementation complexity of achieving this versus just calling the API with the values you actually want. Also, what happens if you created a folder with defaults and change the value of a default, are we going to have users expect the value on the folder to change too? I guess we'll have users in both camps and someone will always be left unhappy.
I vote close as wont-fix, as this makes things ambiguous, and just leads to unhappy people just in different ways.
@calmh ?
calmh commentedon Jun 20, 2017
zatricky commentedon Jan 30, 2018
I recently started moving over from resilio to syncthing - and find this to be an essential missing feature adding much frustration to the migration process.
Bear in mind I am synchronising 8 Devices with 18 Folders. 3 Devices don't have all the folders (mobile phone and storage-limited laptops for example):
2x servers (sites A+B)
3x desktops (sites A+C)
2x laptops (mobile between A+C, occasionally on site B)
1x mobile phone
The proposal to use the API is usable by developers. But long-term the majority of the user-base will not be developers. In my case including configuring the first device, I have to hand-configure ~105 folders to sensible values for my use-case. Maybe now that I know there is an API I will look into a more automatic way to set this up for the remaining folders I was too lazy correctly to configure the first time around.
Many of the default settings are silly for specific situations. Examples:
1: Rescan becomes pointless/inefficient if inotify is available
Ferroin commentedon Jan 30, 2018
@zatricky Two specific comments...
zatricky commentedon Feb 1, 2018
Re inotify that explains a lot, yes. Thanks
Re random for initial sync, it is highly dependent on your use case. For example, if you are storing millions of photographs that you need to work with, you might want to prioritise the latest photographs over the oldest - or psosibly the opposite. This matters most when synchronising for the first time and when there is a new large dump of content. For minor content changes, the pull order doesn't have a significant influence.
[-]Feature Request: Editable default folder parameters[/-][+]Editable default values for folders, devices[/+]all: Add configurable defaults (fixes syncthing#4224, fixes syncthing…
all: Add configurable defaults (fixes syncthing#4224, fixes syncthing…
all: Add configurable defaults (fixes #4224, fixes #6086) (#7131)