How to import back a "Receive Encrypted" folder?

Hello,

I used to run a “Receive Encrypted” folder on a server, and now I’m moving it to a replacement server.

I want a new instance of syncthing to serve the same files, to the same clients, etc.

I do have the password and the folderid, and I’m able to use syncthing decrypt to decrypt files.

BUT, I’d prefer NOT to decrypt the files, but rather I want to “import back” the encrypted folder into a new instance of syncthing. But when I try to do so, I get the following error:

The following unexpected items were found. You should never add or change anything locally in a “Receive Encrypted” folder.
Path: 0.syncthing-enc/02/2MCLI1O6K3OXD1… Size: …

Which means that syncthing sees the files, knows that it’s supposed to be a “Receive Encrypted” folder, but what would be the way to kind of “re-scan” the files, making it understand that “this is OK, these are the encrypted files, NOT something problematic, you’ve put them there, remember?” :slight_smile:

My folder is just too big to decrypt and upload it back. :frowning:

I tried to look online and in the documentation, but I found no answer. So thanks in advance for any help!

DieselRobot

P.s.: Keep up the good work, syncthing is brilliant, thanks for doing it!

1 Like

Unless I’m mistaken, a “Receive Encrypted” folder shares the same restriction as a “Receive Only” folder in that the destination is expected to not have any existing content. So introducing a pre-populated folder into a new Syncthing instance would appear as though there have been local changes.

Syncthing’s database on your old server contains info about the encrypted folder while Syncthing on your new server doesn’t.

Do you still have access to Syncthing configuration on the old server?

If so, copy it to the new server, making sure that the location of the encrypted folder matches what the old configuration was, or manually update config.xml before starting up Syncthing.

This. If you copy the database together with the files it should be accepted.

Without the database your only option is to have syncthing download the files from a trusted/unencrypted source.

The files actually contain all the needed information, but we haven’t implemented loading the information from them into the database.

(The database holds more information in the encrypted case than in a normal unencrypted receive-only folder.)

Yes, this is exactly the case.

Unfortunately, I don’t have access to the old config folder. Unfortunately I didn’t foresee this problems, and I was under the impression that the password+folderid+data, since it’s enough even for decryption, is what I need. (Logically, it is.)

If this re-import functionality does not exist, maybe I should open a feature request on Github? And in the meanthime, a mention of this special requirement in the documentation with a big red warning would be useful, just so others don’t run into the same issue? :thinking:

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