Joplin: Data location

Created on 30 Nov 2017  路  11Comments  路  Source: laurent22/joplin

Where is Windows desktop version of Joplin saving notebook data to? How do I enable syncing by network directory? When I click on Synchronise, I get OneDrive login screen. I want to use network directory sync, at least until NextCloud driver is available. Thanks.

question-w4f

Most helpful comment

Hi, there are config option to get local sync working on the terminal app, but these options are not exposed yet in the desktop app.

If you would like to try, you can manually set the options in the database though, it's quite straightforward. Simply open the database file in C:\Users\YOUR_NAME\.config\joplin-deskop\database.sqlite with something like SQLite Studio then follow these steps:

  • Close the app first
  • Open the "settings" table
  • Create (or update if already exists) a row with key "sync.target" and value "2"
  • Create a row with key "sync.2.target" and value "c:\path\to\your-directory"

Then save your change and open the app. It should now sync with the directory "c:\path\to\your-directory" (which can be a network share).

All 11 comments

I just saw storage location in #7. Is that issue just for displaying the storage location or to be able to configure the location? Still don't know how to enable network directory syncing... Thanks.

Hi, there are config option to get local sync working on the terminal app, but these options are not exposed yet in the desktop app.

If you would like to try, you can manually set the options in the database though, it's quite straightforward. Simply open the database file in C:\Users\YOUR_NAME\.config\joplin-deskop\database.sqlite with something like SQLite Studio then follow these steps:

  • Close the app first
  • Open the "settings" table
  • Create (or update if already exists) a row with key "sync.target" and value "2"
  • Create a row with key "sync.2.target" and value "c:\path\to\your-directory"

Then save your change and open the app. It should now sync with the directory "c:\path\to\your-directory" (which can be a network share).

Thank you, I will give that a try.

Hi @laurent22,

I tried what you said on Linux (Fedora 27) but it didn't work. Also I dont know if it works on windows.
Is there anything else we could try?

Regarding the default storage locations - i am quoting laurent22 from #7

On Windows: C:\Users\YOUR_NAME.config\joplin-deskop

On macOS and Linux: ~/.config/joplin-desktop

Hi @yafp
I edited
~/.config/joplin-desktop/database.sqlite but it didn't work. Thats what i meant...

Edit: In Settings table it also creates an entry with key sync.2.context and value {}.

I get the following error in file log.txt. I did exactly what @laurent22 said in a previous comment in this issue.

log.txt:

2017-12-07 21:46:49: "Profile directory: /home/pantelis/.config/joplin-desktop"
2017-12-07 21:46:49: "Scheduling sync operation..."
2017-12-07 21:46:52: "Doing scheduled sync"
2017-12-07 21:46:52: "Error: Error: EACCES: permission denied, mkdir '/.sync'
Code: EACCES
Error: Error: EACCES: permission denied, mkdir '/.sync'
    at FileApiDriverLocal.fsErrorToJsError_ (/tmp/.mount_JoplinTLvG3z/app/resources/app/lib/file-api-driver-local.js:24:16)
    at fs.mkdirp (/tmp/.mount_JoplinTLvG3z/app/resources/app/lib/file-api-driver-local.js:172:19)
    at xfs.stat (/tmp/.mount_JoplinTLvG3z/app/resources/app/node_modules/fs-extra/lib/mkdirs/mkdirs.js:55:43)
    at /tmp/.mount_JoplinTLvG3z/app/resources/app/node_modules/graceful-fs/polyfills.js:284:29
    at FSReqWrap.oncomplete (fs.js:114:15)"
2017-12-07 21:46:52: "Operations completed: "
2017-12-07 21:46:52: "Total folders: 2"
2017-12-07 21:46:52: "Total notes: 4"
2017-12-07 21:46:52: "Total resources: 1"
2017-12-07 21:46:52: "There was some errors:"
2017-12-07 21:46:52: "Error: Error: EACCES: permission denied, mkdir '/.sync'
Code: EACCES
Error: Error: EACCES: permission denied, mkdir '/.sync'
    at FileApiDriverLocal.fsErrorToJsError_ (/tmp/.mount_JoplinTLvG3z/app/resources/app/lib/file-api-driver-local.js:24:16)
    at fs.mkdirp (/tmp/.mount_JoplinTLvG3z/app/resources/app/lib/file-api-driver-local.js:172:19)
    at xfs.stat (/tmp/.mount_JoplinTLvG3z/app/resources/app/node_modules/fs-extra/lib/mkdirs/mkdirs.js:55:43)
    at /tmp/.mount_JoplinTLvG3z/app/resources/app/node_modules/graceful-fs/polyfills.js:284:29
    at FSReqWrap.oncomplete (fs.js:114:15)"
2017-12-07 21:46:52: "Updading all notifications..."
2017-12-07 21:46:52: "Garbage collecting alarms..."

Hmm ok I see, it seems it might not be pre-pending the path to the sync directory so it ends up trying to sync with / which creates an error. It's probably easy to fix, I'll take a look.

Thanks @laurent22 :)

  • Create a row with key "sync.2.target" and value "c:\path\to\your-directory"

The key should be "sync.2.path" not "sync.2.target".

This is now enabled on desktop and cli app - see https://github.com/laurent22/joplin/issues/61

Was this page helpful?
0 / 5 - 0 ratings