Hello Guys,
I’ve been trying to set up the external versioning in a specific shared dir, but when I delete a file on a remote device, the command line retrieves the following error.
2024-08-26 15:51:21 "Teste" (vggsn-nlfce): Failed to sync 1 items
2024-08-26 15:51:21 Folder "Teste" (vggsn-nlfce) isn't making sync progress - retrying in 1m0s.
2024-08-26 15:52:21 Puller (folder "Teste" (vggsn-nlfce), item "20240328_134947 (1).jpg"): syncing: delete file: external versioner: archive: exit status 2
I used the script presented in the documentation as reference, but even this script without modifications occurred error. So I commented some lines to write information in a specific text file, as you can see below:
#!/bin/sh
set -eu
# Where I want my versions stored
versionspath=~/.trashcan
# The parameters we get from Syncthing
folderpath="$1"
filepath="$2"
# First ensure the dir where we need to store the file exists
outpath=$(dirname "$versionspath/$filepath")
echo "testando script" >> /home/felipe/.local/bin/log.txt
echo "$versionspath/$filepath" >> /home/felipe/.local/bin/log.txt
echo "$folderpath/$filepath" >> /home/felipe/.local/bin/log.txt
exec 2> /home/felipe/.local/bin/log.txt
# mkdir -p "$outpath"
# Then move the file there
# mv -f "$folderpath/$filepath" "$versionspath/$filepath"
I’m running v1.27.10, Linux (64-bit Intel/AMD) version with a Ubuntu 22.04.4 LTS 64 Bits.
Do you have any idea about what my be happening, and how can I solve it?
The Docs use /Users/jb/bin/onlylatest.sh %FOLDER_PATH% %FILE_PATH% in the example, but I think you need quotes there too, i.e. /Users/jb/bin/onlylatest.sh "%FOLDER_PATH%" "%FILE_PATH%", especially since the filename in question has spaces in it.
Also, you may want to go to Actions → Logs → Debugging and enable versioner logging for more information.
At first, in the command line I was setting only /home/felipe/.local/bin/onlylatest.sh.
I changed the command line as you said, /home/felipe/.local/bin/onlylatest.sh "%FOLDER_PATH%" "%FILE_PATH%", and it worked now.
But I noticed that it took a lot of time to sincronize the files, and I mean that, even after the synchronization status in the UI, the files was not removed in the remote device. But I believe I can change this behavior in the Advanced tab.
This sounds strange, and it doesn’t seem to be related to the versioning problem, does it? Unless you’re trying to synchronise the custom versions folder? Normally, Syncthing works in a way that the folder on both sides is kept in an identical state, meaning that all new files, modifications, and deletions are synced both ways.
No I’m not trying to versionate de ~/.trashcan folder. I meant I took just a little bit more to realize all the changes made, and move the content to another folder I have set.