Migrate local sync directory to a new local location?

Dear Syncthing gurus:

How do I migrate a local sync directory to a new local location? (I was using space on the home drive, but I want to move the sync directory off-board to a large USB drive.) This is a send-only folder on my computer, but not sure that matters.

So far doing this incurs a huge bandwidth burden, so I’m wondering if there is a better way.

Here’s what I did

  1. Pause syncthing
  2. Rsync’d the sync directory contents from its old local location to its new local location
  3. Copied down the Folder ID# and then removed the sync directory via the Syncthing control panel
  4. EITHER - create a new sync directory to the new local directory and specify the prior Folder ID# I wrote down - OR - let one of the remote peers re-offer the directory back to me and accept it, building its connection to the new local folder location. In either case, I re-specify send-only, and re-specify my ignores.

At this point, the folder shows “Up To Date”, but the remote device shows “Syncing (8% 9% 10% …)” and then slowly builds up to 100% as my computer resends the entire directory contents again. But the new directory is identical to the old one and nothing should have to be resent. In fact, how can Syncthing even detect that it’s looking at a new duplicate set of data?

Somehow, I’m happy, but the peer node is not happy and is downloading the entire directory again.

What’s up? How do I accomplish my goal in a better way?

Note to self: Similar issue here Best practice for adding nodes with existing data copy in 10 TB range.

https://docs.syncthing.net/users/faq.html#how-do-i-rename-move-a-synced-folder

It’s most likely not downloading the data, but the index.

1 Like

Jakob (@calmh),

Yea… but… from a user point of view, I guess the content of the exchange is less important than the fact that it takes ~hours~.

Would you expect that a manual edit of the config file suggested in the docs (“An alternative way is to shut down Syncthing, move the folder on disk, edit the path directly in the configuration file and then start Syncthing again.”) could avoid the big download (index or data)?

No matter which method is used, how does Syncthing even know a change occurred? Why does either node think its index (or data) needs refreshing since everything is identical to the situation where the directory swap was not done?

Couldn’t syncthing hash the share directory(ies) on the two nodes and if the same, stop all data transfer and declare “sync complete”? If the syncroots are not the same, step down to sub directories eliminating data transfer for those that are the same. Why transfer data ~or~ indexes if both sides are the same and that same-ness can be verified by exchanging short hashes over the net?

This could be a big syncthing performance enhancement. Especially for the other poster who was waiting ~days~ to get the data exchange done.

I’ve explained why that is needed in the other post. The shutdown, move and modify config has 0 performance impact, unless you screw something up (change mtimes of files or move stuff to the wrong path).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.