Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data location #42

Closed
ekw opened this issue Nov 30, 2017 · 11 comments
Closed

Data location #42

ekw opened this issue Nov 30, 2017 · 11 comments

Comments

@ekw
Copy link

ekw commented Nov 30, 2017

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.

@ekw
Copy link
Author

ekw commented Nov 30, 2017

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.

@laurent22
Copy link
Owner

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).

@ekw
Copy link
Author

ekw commented Nov 30, 2017

Thank you, I will give that a try.

@Pant
Copy link

Pant commented Dec 1, 2017

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?

@yafp
Copy link

yafp commented Dec 1, 2017

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

@Pant
Copy link

Pant commented Dec 1, 2017

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 {}.

@Pant
Copy link

Pant commented Dec 7, 2017

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..."

@laurent22
Copy link
Owner

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.

@Pant
Copy link

Pant commented Dec 7, 2017

Thanks @laurent22 :)

@repercussion
Copy link

  • 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".

@laurent22
Copy link
Owner

This is now enabled on desktop and cli app - see #61

@lock lock bot locked and limited conversation to collaborators Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants