Migrating storage in server

Operating system

Linux

Joplin version

2.13.3

Desktop version info

Joplin 2.13.11 (prod, win32)

Client ID: a252f6a927ad4ceaa7847b5aa3977212
Sync Version: 3
Profile Version: 44
Keychain Supported: Yes

Revision: 6670f9a

Sync target

Joplin Server

What issue do you have?

I just setup Joplin Server on a Synology NAS using a PostgreSQL db without specifying a STORAGE_DRIVER. I then found that the db limits resources to 250MB and that I could move resources to the filesystem, so I used these instructions to do so: Migrating storage for an existing installation.

After changing the STORAGE_DRIVER to Filesystem, as per above instructions, I synced a new device and all resources, but none were copied to the Filesystem. On a phone that had previously synced notes but was set to manually download resources, downloading a resource didn't trigger a move to the Filesystem either. I finally used this command to trigger the move, which did populate the Filesystem:

docker exec -it CONTAINER_ID node packages/server/dist/app.js storage import --connection 'Type=Filesystem; Path=/path/to/dir'

...and the suggested query says everything was moved (see attached screenshot for query result)

But the database still seems to contain the data as well... even though I set Mode to ReadAndClear for the database (see attached).

So I went digging in the db and found that the connection string in the storages table doesn't include the Mode that I added to the environment variable and am wondering if that's the cause (see attached)?

I'm also wondering how I can delete the resources from the db now; maybe I can manually run a query in the db, for example? Or maybe there is a script to do this?


P.S. Thanks for a great app! I've been using it for daily notes for months and am just now doing a full migration from Evernote.

Screenshots

2023-12-30_133138.png
2023-12-30_133306.png


2023-12-30_133806.png

I never could figure this out and I wanted to be able to backup the Postgre db without including all the resource data so I deleted the db and resources in the filesystem and synced it again. It still seems to me like something went wrong with this process but I no longer have access to that environment to debug/test since I worked around the issue another way.

Hello dansmith65, I stopped reading in the middle of your long post. It made me think there is a much simpler route to solving such problems than migration. It goes like this:
local backup -> setup a new target -> sync ( -> finito).
I hope I didn't misunderstand your issue.
Good luck

This had to do with setting up Joplin Server; I sorted it out by deleting old data both locally and on the server, then importing from backup into Joplin on the desktop and syncing with the server again.

There is a migration feature in Joplin Server that didn't seem to work as documented, which is why I posted this.

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