Joplin: Dual-sync ability

Created on 21 Apr 2018  路  8Comments  路  Source: laurent22/joplin

Operating system

  • Windows
  • macOS
  • Linux

Application

  • Desktop
  • Terminal

It will be great if we could sync between joplin and multiple sources at the same time (without changing the settings each time).
This way, syncing the windows desktop with both dropbox and local directory (in gdrive) could link between mobile app that syncs with dropbox and linux version which currently cannot. Also, it can help backing up data.
Currently in each sync the sync source has to be changed repeatedly.

Most helpful comment

For backup I'd recommended using the JEX or RAW export. Using sync for this is very risky because if for some reason the backup destination becomes empty, all your notes will get deleted. As a general rule, you don't want your backup target to modify the source so that's why export rather than sync is recommended.

You can use the CLI tool for this too. Personally I use the following script from a cron to backup to a Git repo at regular intervals:

#!/bin/bash

BACKUP_DIR="/path/to/backup"
JOPLIN_BIN="$HOME/.npm-global/bin/joplin"

$JOPLIN_BIN sync
$JOPLIN_BIN e2ee decrypt

cd "$BACKUP_DIR"
rm -f *.md
rm -f resources/*
$JOPLIN_BIN export --format raw "$BACKUP_DIR"
git add .
git commit -m "Update"

All 8 comments

This sounds messy.
I feel the notetaking app should not be there to sync your filesystem.

I would change your idea for

at the same time

to each notebook can enable or disable syncing.
And maybe each notebook can have a single source, but most likely you could handle your files better and you wouldn't need this.

Following my own advise.
File sync ability of Joplin is so powerful. You should handle the complexity of syncing elsewhere.

For example in nextcloud. It has support for all OS.
The obvious trick for me is to sync most of the time to the local nextcloud folder.
I can control in nextcloud which files are in the folder.

This was an issue for very big notebooks -> would take forever. And i maybe want to save diskspace by not downloading some notebooks.
So if nextcloud is an option for you. I highly recommend it to you.
I will figure out if its better to create different nextcloud users for different devices.
Maybe we could write something in the docs like:

For each client you can choose a single sensible source, which could be local if you want to subset your data. The file sync is best handled by tools like nextcloud. This gives you endless possibilities to organize your notebooks for each client.

Maybe I wasn't clear. I'm not talking about general data files, but only the notes. Backup data = backup the notes in multiple places.

The idea of sync is examining the last time stamp of each file and update all the files to their most recent version. It is not hard to do it with several locations (i.e update each note to its most recent version in both local directory and dropbox).

For backup I'd recommended using the JEX or RAW export. Using sync for this is very risky because if for some reason the backup destination becomes empty, all your notes will get deleted. As a general rule, you don't want your backup target to modify the source so that's why export rather than sync is recommended.

You can use the CLI tool for this too. Personally I use the following script from a cron to backup to a Git repo at regular intervals:

#!/bin/bash

BACKUP_DIR="/path/to/backup"
JOPLIN_BIN="$HOME/.npm-global/bin/joplin"

$JOPLIN_BIN sync
$JOPLIN_BIN e2ee decrypt

cd "$BACKUP_DIR"
rm -f *.md
rm -f resources/*
$JOPLIN_BIN export --format raw "$BACKUP_DIR"
git add .
git commit -m "Update"

Backup is just an exmaple. The main idea is the ability to sync different sources at the same time.

love the idea of the script. Easy way to version control all your notes.
Actually you can use nextclouds backup system, too.
@luriomer i do get it, you want to sync different sources. But this is not an achievement at all.
syncing is not that simple:
Why does ownCloud use csync rather than rsync?

  • rsync is a one-way syncing protocol. This means that if you have two servers and delete a file on one side, it will pop up again if you use rsync. To ensure old files get removed but new files added, and updated files overwritten, you need a N-to-N sync solution. ownCloud uses csync for syncing, which also deals with conflicts in a smart way.

Sorry you are just describing the functionality of dropbox. If you want to replace the dropbox technologoy with joplin you can. Or just use existing open source software which seemless integrates with joplin.

I think that would be out of scope and probably too complex to implement.

I would like to add that this functionality is available in Boostnote and is very useful. It allows for collaborative notes that are stored in shared dropbox/GDrive folders and also personal notes that are stored locally/personal dropbox/GDrive.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gerroon picture gerroon  路  70Comments

haitaogithub picture haitaogithub  路  46Comments

harmancasvi picture harmancasvi  路  34Comments

alexdevero picture alexdevero  路  53Comments

alexdevero picture alexdevero  路  43Comments