reddit / emacs
What do you use to sync org content across devices?
trae · 2022-08-04 15:38
Hey folks,
I've recently been trying to get off dropbox and iCloud in favour of risilio sync, synching and seafile.
I'm having a lot of trouble with conflicts though, it seems that every change causes a conflict that I have to resolve manually.
I hate to say it, but dropbox was the most robust solution. I wanted to stop paying a monthly fee and own my data, but the friction it has introduced is unexpected.
What do you use and what's your workflow like?
Distinct-Score-1133 · 2022-08-04 15:45
Currently I self-host Nextcloud, and use it to sync my org files (including orgzly :) ). It works perfectly!
I think that there are Nextcloud instances out there with e2ee, those would be pretty private and secure.
jtr3322 · 2022-08-04 15:47
Syncthing. It's specifically designed for that, works on Android too, and easy to set up. It's a beautiful tool.
Unlifer · 2022-08-04 16:03
Git?
WallyMetropolis · 2022-08-04 16:18
Google drive is free up to a point and works exactly like Dropbox.
trae · 2022-08-04 16:33
I'm liking synching a lot, but I'm running into major conflicts problems. Seems like every change results in a conflict. What is your workflow like?
trae · 2022-08-04 16:34
I don't know of any good git implementations for iOS but you've inspired me to look. Thanks!
Jak_from_Venice · 2022-08-04 16:38
That’s the solution I would go to
MitchellMarquez42 · 2022-08-04 16:38
On Android I just keep one file and edit it in Emacs within termux, then `scp` it to my home server. Will check this thread for better solutions though.
!remindme 5d
RemindMeBot · 2022-08-04 16:39
I will be messaging you in 5 days on [**2022-08-09 16:38:27 UTC**](http://www.wolframalpha.com/input/?i=2022-08-09%2016:38:27%20UTC%20To%20Local%20Time) to remind you of [**this link**](https://www.reddit.com/r/emacs/comments/wg4cen/what_do_you_use_to_sync_org_content_across_devices/iixow49/?context=3)
[**1 OTHERS CLICKED THIS LINK**](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2Fwg4cen%2Fwhat_do_you_use_to_sync_org_content_across_devices%2Fiixow49%2F%5D%0A%0ARemindMe%21%202022-08-09%2016%3A38%3A27%20UTC) to send a PM to also be reminded and to reduce spam.
^(Parent commenter can ) [^(delete this message to hide from others.)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Delete%20Comment&message=Delete%21%20wg4cen)
*****
|[^(Info)](https://www.reddit.com/r/RemindMeBot/comments/e1bko7/remindmebot_info_v21/)|[^(Custom)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5BLink%20or%20message%20inside%20square%20brackets%5D%0A%0ARemindMe%21%20Time%20period%20here)|[^(Your Reminders)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=List%20Of%20Reminders&message=MyReminders%21)|[^(Feedback)](https://www.reddit.com/message/compose/?to=Watchful1&subject=RemindMeBot%20Feedback)|
|-|-|-|-|
nnomae · 2022-08-04 16:52
Also using Dropbox. Not a huge fan of it either but it works. I dual boot a lot so it gets very annoying if I reboot and find something hasn't synced yet.
I've used rclone as well, I actually have a few different cloud drives I use and it's very nice for having a shared interface to them all. You can mount with it too but it seemed to be a bit slow for my liking, could well just be some option I'm missing.
gzrrt · 2022-08-04 16:53
Not OP, but I've installed syncthing on a remote server and use that as the universal 'source of truth' for my machines. So instead of all of these devices talking to each other directly (and trying to sync different versions of the same files), they're only connected to this one server for sending / receiving updates. That basically solved the problem for me
WaitingForEmacs · 2022-08-04 17:05
*Working Copy* gets very good reviews on iOS. I have not used it, but I really value *Secure ShellFish* (SSH / SFTP) by the same author, Anders Borum.
quinyd · 2022-08-04 17:21
Are you on ios or android? On ios Syncthing sucks so much. I recommend git using Working Copy.
Unlifer · 2022-08-04 17:30
Oh, are you reading notes on your iPhone?
Maybe try publishing your notes on a web server. You can try recursively converting org files to html using Pandoc or ox-publish
I've been meaning to publish my org notes using Hugo but haven't gotten the time to make a good looking website.
I end up using iCloud to sync files to my iPad Mini
trae · 2022-08-04 17:48
I admire your tenacity, that's a lot of work!
trae · 2022-08-04 17:51
Yeah I use beorg on my iPhone. I use it a lot as "inbox" for new tasks or interesting content and also to manage my agenda, so a read only instance is not going to work for me.
trae · 2022-08-04 17:52
Huh, I never considered this kind of arrangement. How do you configure versioning on your "master" node?
trae · 2022-08-04 17:52
I installed a syncthing on iOS and it seems to work ok. It's the very simple conflicts that I'm having trouble with.
tangonov · 2022-08-04 18:00
I had this problem too. Syncthing doesn't pretend to know what's best for you. Here some methods that I use to avoid file conflicts:
1. Make sure syncthing is always running across any device that may be using your files. If a device is down/off, never make chances on more than 1 device until all of them are back up.
2. Be mindful of applications that do, or do not automatically sync. Orgzly on Android does *not* auto sync. If you make changes on Orgzly, make sure they are synced before making changes on another device.
3. (last resort) Tell syncthing to dispense with conflict resolution and just accept whatever version is newest, always. This comes with the caveat of data loss.
awkisopen · 2022-08-04 18:11
I find Synology NASes to be a good halfway point between owning my own data but also getting the convenience of commercial solutions. To that end, I use Synology Drive to sync across my phone and computers, and it has been very effective so far.
quinyd · 2022-08-04 18:31
I kept having conflicts because the sync was delayed and not really too quick.
styrg · 2022-08-04 18:40
For me, Nextcloud has worked great. I'm running it on Unraid. I also use Orgzly on my phone with the webDAV and I \*love\* that feature. I do grocery lists, chores/errand todos, and log gym stuff all on my phone.
paretoOptimalDev · 2022-08-04 18:57
Syncthing+tailscale+lower checking intervals in advanced syncthing folder config.
yaconsult · 2022-08-04 20:34
I have been researching this same topic and experimenting. So far, I have been very impressed with rclone and it's many backends. And then I discovered that it has a "mount" option as well.
But what about when, for whatever reason, the remote filesystem is unreachable? I found this interesting post about providing dropbox-like remote file sync:
[Continuous immediate file sync with Rclone](https://blog.rymcg.tech/blog/linux/rclone_sync/)
Here are some other videos that I found helpful:
[How to Mount a Google Drive Locally with Rclone](https://www.youtube.com/watch?v=f8K-V3HHDA0&list=PLMr8zQxnuP4ngP8zSTLul2juIpPhZMHh5)
[Encrypt your data automatically before syncing to cloud storage using Cryptomator](https://www.youtube.com/watch?v=UHl3nClHm4o&list=PLMr8zQxnuP4ngP8zSTLul2juIpPhZMHh5)
[How to Properly Use Cloud Storage | Rsync Encrypt Tutorial](https://www.youtube.com/watch?v=KBr_qf5G4CY&list=PLMr8zQxnuP4ngP8zSTLul2juIpPhZMHh5)
Let us know what you come up with. I am continuing to experiment. Rclone runs on linux, windows and I found an android rclone app called RCD.
gzrrt · 2022-08-04 20:41
My use cases are pretty simple, so I basically don't. A file gets updated on this laptop, or an Android phone, etc, and the remote server gets synced with that automatically. Those changes get pushed out to other devices later, as soon as they're powered on (and Syncthing starts running on login)
yaconsult · 2022-08-04 20:42
Not quite. Dropbox allows you to have a local copy of the file that is updated automatically when the master file on dropbox is changed. If you lose connection to the internet for any reason, you still have a local copy of the file in the state it was in when you were last connected. With google drive, if you lose your connection to the net, you can not access the files. In another reply I made in this thread, I linked to a sync script to provide a function similar to the way dropbox works.
Also, be aware that dropbox, by default, creates a local copy of all of your files on dropbox which can use up lots of space. You have to explicitly stop the default sync and configure it to only sync the folders and files that you want it to.
[deleted] · 2022-08-04 21:00
[deleted]
gwynbleiddeyr · 2022-08-04 21:04
I was using syncthing with orgzly on my phone and syncthing on my laptop. Got a lot of conflict issues. I would set one file as edit on one and read only on other device. But this was breaking my workflow too much.
Now I have gone to Dropbox. I have 2 laptops and 1 mobile. And things are much better now.
trae · 2022-08-04 21:21
I love rclone and use it for my offsite backups (local NAS to back blaze b2) but there's no iOS client unfortunately. iOS is a must for my workflow.
podtatranec · 2022-08-04 21:44
I would add one more tip that helped me - I have a timer in emacs to auto save all org buffers periodically. That way I won't forget unsaved buffer and create conflicts
WallyMetropolis · 2022-08-04 21:47
I have a local copy of my org files synced to Google Drive right now that's availalbe without an internet connection.
yaconsult · 2022-08-04 22:05
What program is doing the syncing? Does it work on windows, Linux, Android, and IOS? How is the out-of-sync condition resolved?
What if the same file is changed on two different computers at the same time? This problem is one that git was created to solve.
yaconsult · 2022-08-04 22:09
I don't use iOS, but this app claims to support rclone:
[CryptCloudViewer](https://apps.apple.com/us/app/cryptcloudviewer/id1458528598)
WallyMetropolis · 2022-08-04 22:13
Google Drive is what does the synching. There's a desktop app: [https://www.google.com/drive/download/](https://www.google.com/drive/download/)
Hi_ItsPaul · 2022-08-04 22:26
I switched from Dropbox to Syncthing. Dropbox sync stopped working for me because I had nearly 100k files (web dev) and only around 5gb of data.
Syncthing works if you take the time to research the setup. I really wish there was a guide/pre-config online to set it up like Dropbox right off the bat. I'll see if I can make one.
cinq · 2022-08-04 22:32
i have (global-auto-revert-mode t) so i do not miss a change on another device
and (setq create-lockfiles nil) reduces some sync conflicts for me (from https://erwtc.com/working-emacs-lock-files-and-syncthing/ )
jtr3322 · 2022-08-04 22:44
I need to know more about your setup.. I have an old blog post about it, it is roughly still the same set-up: https://taonaw.com/raspberry-pi-org-hub/
jtr3322 · 2022-08-04 22:44
Yep. Same here.
jtr3322 · 2022-08-04 22:45
Also see my post above (I call it the "hub" for a reason: https://taonaw.com/raspberry-pi-org-hub/)
jtr3322 · 2022-08-04 22:46
They have an ios version now? Ohhhh
kickingvegas1 · 2022-08-04 23:31
NGL, I gave up on cloud-based file sync a long time ago. It's too inconsistent and error prone, especially if I have multiple clients on different systems working on the same file. Instead I remote shell into a single system and use emacsclient for remote access. Distributed access doesn't always have to mean distributed state.
stibbons · 2022-08-05 02:25
\+1
My only annoyance with this is that orgzly's webdav connector doesn't automatically sync (local folders didn't, the last time I tried, but that was a while ago). So, very occasionally, I'll introduce a conflict by editing a file on my phone before checking it's synced.
acow · 2022-08-05 04:08
Git. It’s natural for PCs, and on iOS you have Working Copy (for git) and Plain Org (for org).
Responsible-Newt9241 · 2022-08-05 05:02
Icloud but maybe that is not the best idea?
Distinct-Score-1133 · 2022-08-05 05:14
It works almost perfectly for me now. It has auto-sync option for whenever the app is opened or resumed. I do miss sometimes background sync though I guess.
FOSSbflakes · 2022-08-05 06:02
Agreed, and even that is a bit of a workaround for the fact the nextxloud app does not automatically sync content locally.
Two_Souls · 2022-08-05 06:30
I used DriveSync to sync between Google Drive and a folder on my Android phone - which is then used up by Orgzly.
donio · 2022-08-05 06:41
I don't sync, I access. Via tramp or emacsclient over ssh.
unhammer · 2022-08-05 07:53
Hm, I've used syncthing for some years without conflict issues. But I have an always-on raspberry pi just for syncthing (so I can access the most recently edited thing on my phone even if I closed my laptop before turning on my phone, that probably helps). I also use focus-autosave-mode, ie. save all the time.
Mamonimoni · 2022-08-05 09:13
Resilio has selective sync.
Syncthing doesn't.
Kind of a big deal if you care about this.
CGenie · 2022-08-05 09:20
I did use Syncthing for a while but because of conflicts I replaced that with fossil scm. Add some useful bashrc aliases and you're good to go.
And in case of conflicts, fossil is better at merging and managing them compared to git, IMHO.
EDIT: You're on iOS, in that case I don't know. I use Android with Termux.
mjhoy · 2022-08-05 10:14
I just tried out Working Copy + Plain Org this morning on my iPhone, so far so great.
emacsomancer · 2022-08-05 12:31
This is what I do too.
(The catfriend syncthing fork on Android seems to work a bit better than the 'official' version, FWIW.)
yaconsult · 2022-08-05 14:33
There is no desktop app for Linux, unfortunately, although people have been requesting one for many years.
WallyMetropolis · 2022-08-05 17:07
Fair. I moved off dropbox when they stopped supported btrfs several years ago. So I feel that pain.
mop-crouch-regime · 2022-08-05 17:28
Sync.com, I have a local directory at ~/Sync and I put all my org files in there. Works great across multiple laptops
il_valsa · 2022-08-06 11:22
I use syncthing where I have a bare git repo that I clone on every device.
So I have decentralised sync + versioning.
Use it on Linux, android and windows, never had sync problem in +1 year.
stibbons · 2022-08-06 12:46
Ooo, thanks for the tip. That should mostly sort me out too.
Odd-Distribution2887 · 2022-08-06 15:36
I have this issue too. How do you setup a remote server?
Odd-Distribution2887 · 2022-08-06 15:36
Was this hard to setup? I have this issue too
trae · 2022-08-06 16:54
Let me see if I understand -- you sync your repo, and then have a local check out on every machine? Do you auto commit?
il_valsa · 2022-08-06 18:42
Yes. I do not auto commit. Can be a good upgrade.
Do you have any suggestions on how to implement it?
unhammer · 2022-08-06 21:14
If you have some always-on computer it's easy, just put syncthing on it and connect it to your other devices the regular syncthing way. What I did was plug a raspberry pi into my router. I don't have any screen connected to it, but no need, just open a port through ssh with e.g. `ssh -L 8385:localhost:8384 pi@berry`. This makes it so port 8385 on my laptop shows port 8384 on `berry`, so I can open `localhost:8385` on my laptop to see the syncthing web interface of `berry`.
Also in emacs you may want https://melpa.org/#/focus-autosave-mode and
(use-package focus-autosave-mode :config (focus-autosave-mode 1))
yaconsult · 2022-08-25 03:57
>DriveSync
I guess you mean this one on github? [https://github.com/MStadlmeier/drivesync](https://github.com/MStadlmeier/drivesync)
Looks interesting, I will give it a try.
I have been using an android client called RCX: [https://play.google.com/store/apps/details?id=io.github.x0b.rcx&gl=US](https://play.google.com/store/apps/details?id=io.github.x0b.rcx&gl=US)
Two_Souls · 2022-08-25 04:32
Look up autosync for Google drive on Google play store. That's the one I meant.
yaconsult · 2022-08-30 05:26
Thanks! Trying it now.