Skip to content

Commit e604546

Browse files
committed
feat(debugging): DRY notes on how to get file info
1 parent 79c0751 commit e604546

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

dev/debugging.rst

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,43 @@
33
Debugging Syncthing
44
===================
55

6+
A file isn't syncing
7+
--------------------
8+
9+
If you wonder why a given file is out of sync, or you suspect it's caused by
10+
a bug, we need to collect some information. You'll need *the name of the file*
11+
and *the folder ID* it's in.
12+
13+
To begin with, check the GUI on the *receiving* side. It may be listed under
14+
"Failed items", with a cause for the failure. Secondly, check the logs on
15+
the *receiving* side. If the file has failed to sync this will be mentioned
16+
in the logs even if it is not currently visible in the GUI. (If you are
17+
debugging this together with someone on the forum, post screenshots of the
18+
GUI and the logs in question.)
19+
20+
If nothing relevant showed up so far, or the question is why the file is
21+
considered out of sync to begin with in a receive-only setup, etc., we can
22+
look closer at what Syncthing knows about the file. You'll need to do these
23+
steps on *both* the receiving side and sending side. We will need to use the
24+
Syncthing CLI for this.
25+
26+
1. An extract of database metadata for the file, taked by the command
27+
``syncthing debug database-file $folderID $fileName``, where
28+
``$folderID`` represents the folder ID (e.g. ``abcd-1234``) and
29+
``fileName`` is the name of the file, including any directories, relative
30+
to the folder root. (Syncthing v2 only; but we're probably not debugging
31+
this on v1 any more.)
32+
33+
2. Details of the file information for the file, taked by the command
34+
``syncthing cli debug file $folderID $fileName`` (same folder ID and file
35+
name as above).
36+
37+
Post the output from both of these, verbatim, indicating which is the
38+
receiving side and which is the sending side.
39+
40+
Debug logs
41+
----------
42+
643
There's a lot that happens behind the covers, and Syncthing is generally
744
quite silent about it. A number of environment variables can be used to
845
set the logging to verbose for various parts of the program, and to
@@ -21,7 +58,7 @@ On windows, it needs to be set prior to running Syncthing.
2158
C:\> set STTRACE=model
2259
C:\> syncthing
2360

24-
Environment Variables
61+
Environment variables
2562
---------------------
2663

2764
.. include:: ../includes/env-vars.rst

0 commit comments

Comments
 (0)