ganiulis / obsync

Sample script from the article.
https://medium.com/@gintarasan/saving-money-syncing-obsidian-with-google-drive-in-ubuntu-22-04-c5a8137c207d
Apache License 2.0
3 stars 0 forks source link

bsync completes sync with error #1

Open AlexsandroRyan opened 2 months ago

AlexsandroRyan commented 2 months ago

Description

When running the script for a while every day, it seemed to me that my data was being stored in Google Drive as I was expecting, but suddenly I checked Google Drive and the latest data of my local Obsidian vault wasn't there.

When I tried running the script in the terminal, the following logs pops up:

Failed to bisync: prior lock file found: /home/alex/.cache/rclone/bisync/home_alex_Documents_rclone..remote_rclone.lck

Screenshot: image

Reproduction

Not sure how to reproduce it, but after some time every day running this script, this error starts happening. I've actually seen this happened at least 3 times AFAIR.

Expected

Should see an error in the notification messaged if something goes wrong.

Actual

Notifications says it worked perfectly

System

Linux Mint

Solution

Running command rclone deletefile "/home/alex/.cache/rclone/bisync/home_alex_Documents_rclone..remote_rclone.lck" makes it work again.

ganiulis commented 2 months ago

Hello there.

From what I see rclone's bisync command (which my script is a thin wrapper for) hasn't finished executing before it was run again or the command itself has crashed, as the lock file still exists when you run the script.

Unfortunately I haven't ever had the lock file stuck even when using it in multiple distros (Ubuntu, Arch, and Gentoo) so getting some kind of details on what steps you made to get stuck with the lock file would give me something to debug.