syncthing-macos icon indicating copy to clipboard operation
syncthing-macos copied to clipboard

Add "reset deltas" functionality

Open mstgrv opened this issue 7 years ago • 5 comments

Is it possible to add "reset deltas" (https://docs.syncthing.net/users/syncthing.html#cmdoption-reset-deltas) to the app somehow?

Reset deltas is a useful feature for troubleshooting various scenarios with syncing devices properly, it would be handy to have this implemented in this app in some way so that going to the command line isn't necessary. Perhaps a button in Preferences, so it's somewhat hidden?

mstgrv avatar Jan 07 '19 20:01 mstgrv

Its indeed a nice feature to have, the GUI is currently very primitive and need some love with some more functionality (e.g environment variables).

xor-gate avatar Jan 11 '19 20:01 xor-gate

Second that and can we do it at runtime without restart?

DocMAX avatar Aug 08 '22 10:08 DocMAX

Is there any way to reset deltas right now using this application? Even using the CLI?

RayBB avatar Feb 02 '23 14:02 RayBB

Could be with the following (not tested)

  • Stop syncthing
  • defaults write com.github.xor-gate.syncthing-macosx Arguments '--reset-deltas' see https://github.com/syncthing/syncthing-macos#preferences
  • Start syncthing
  • Wait for delta sync
  • Reset Arguments to nothing defaults write com.github.xor-gate.syncthing-macosx Arguments ''

xor-gate avatar Feb 02 '23 14:02 xor-gate

Thanks for your input, as I read the docs more closely I realized there was a way to do this with default arguments.

Here's the script that works for me.

# Enable reset-deltas 
defaults write com.github.xor-gate.syncthing-macosx Arguments '--reset-deltas'

# quit syncthing
osascript -e 'tell application "syncthing" to quit'

# start syncthing
open -a "syncthing"

# sleep 5 seconds to allow syncthing to start
sleep 5

# remove the default arguments for next start
defaults delete com.github.xor-gate.syncthing-macosx Arguments

Thanks again for your help and maintaining this awesome project!

RayBB avatar Feb 02 '23 14:02 RayBB