Synology Drive occasionally gets out of sync when you’re making changes at both ends of a synced folder.
Fortunately, there’s a command you can run, either once-off via ssh, or set as a scheduled task in the Control Panel > Task Scheduler
The command is cloud-control synotifyd-rescan
and you can call it like so:
/var/packages/SynologyDrive/target/bin/cloud-control synotifyd-rescan --view_id $VIEW_ID --path /
To get the View ID, you either need to use the View ID of a shared folder, or of an admin user.
To see all your View IDs you can dump them from the user table with sqlite like so:
sqlite3 /var/packages/SynologyDrive/etc/repo/user-db.sqlite "select * from user_table"
The third column (the one immediately before the username) is the View ID for that user or shared folder.
Wrapping it up, it can be used like so:
#!/bin/bash
USER_NAME="fill in the admin user name or @Shared_Folder name"
VIEW_ID=$(sqlite3 /var/packages/SynologyDrive/etc/repo/user-db.sqlite "select view_id from user_table where name='${USER_NAME}'")
if [ "$VIEW_ID" != "" ]; then
/var/packages/SynologyDrive/target/bin/cloud-control synotifyd-rescan --view_id=${VIEW_ID} --path=/
else
echo "The specified parameter was not found. Please ensure that it is either a valid user account (e.g. admin) or a sharename preceded by the @ symbol (e.g. @Shared_Folder)."
fi