Bisync connection OneDrive to Local folder

What is the problem you are having with rclone?

Hi Guys, 
I have a Raspberry Pi running Open Media vault to use as a NAS. 
My goal is to have the folder "Files", that OMV made on my external disk connected to the pi, in sync with my online storage on OneDrive. 

For this i wanted to use BiSync. As i understand it,  you make two paths and then point them towards each other in the bisync command. 
I succeed in making a connection to One drive and mounting it on a local made folder on my Pi. 
I also made a local  remote , that i can also mount using the option --allow-non-empty when pointed towards the "Files" folder. 

However when i try to use the bisync command , as i think i need to, i always get an error that it cant find the path. 
Maybe i am just interpreting it wrong, and making a stupid mistake. 
I tried starting over again, this however does not seem to help. I also searched around, read the documentation.. 
The documentation seems clear, therefore i think i just wrongly interpret what is stated. 
I have added output of my commands below.

Run the command 'rclone version' and share the full output of the command.

rclone:
rclone v1.58.1
- os/version: raspbian 10.1
- os/kernel: 4.19.75-v7l+ (armv7l)
- os/type: linux
- os/arch: arm
- go/version: go1.17.9
- go/linking: static
- go/tags: none

PI:
Linux pinas 4.19.75-v7l+ #1270 SMP  BST 2019 armv7l GNU/Linux

Which cloud storage system are you using? (eg Google Drive)

Using OneDrive 

The command you were trying to run (eg rclone copy /tmp remote:tmp)


Command that fails : 
pi@pinas:~ $ rclone bisync onedrive:/home/pi/oneDriveData local:/srv/dev-disk-by-uuid-19cce74b-40d7-49e1 b824-6344e7ec3e80/Files 
2022/07/12 16:34:48 NOTICE: bisync is EXPERIMENTAL. Don't use in production!
2022/07/12 16:34:48 ERROR : Bisync critical error: cannot find prior Path1 or Path2 listings, likely due to critical error on prior run
2022/07/12 16:34:48 ERROR : Bisync aborted. Must run --resync to recover.



Usage of command:
  rclone bisync remote1:path1 remote2:path2 [flags]
First i tried using the command without adding :path1 and :path2, because i just want to link and existing folder to an online drive.

I have two remotes :
pi@pinas:~ $ rclone listremotes
    local:
    onedrive:

Like mentioned , mounting them separately goes fine : 
pi@pinas:~ $ rclone --vfs-cache-mode writes mount "onedrive": ~/oneDriveData
^C2022/07/12 17:33:54 ERROR : /home/pi/oneDriveData: Unmounted rclone mount

pi@pinas:~ $ rclone mount "local": /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files --allow-non-empty
^C2022/07/12 17:34:28 ERROR : /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files: Unmounted rclone mount

A log from the command with the -vv flag

pi@pinas:~ $ rclone bisync onedrive:/home/pi/oneDriveData local:/srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files -vv
2022/07/12 17:49:10 DEBUG : rclone: Version "v1.58.1" starting with parameters ["rclone" "bisync" "onedrive:/home/pi/oneDriveData" "local:/srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files" "-vv"]
2022/07/12 17:49:10 DEBUG : Creating backend with remote "onedrive:/home/pi/oneDriveData"
2022/07/12 17:49:10 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2022/07/12 17:49:12 DEBUG : fs cache: renaming cache item "onedrive:/home/pi/oneDriveData" to be canonical "onedrive:home/pi/oneDriveData"
2022/07/12 17:49:12 DEBUG : Creating backend with remote "local:/srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files"
2022/07/12 17:49:12 DEBUG : fs cache: renaming cache item "local:/srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files" to be canonical "/srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files"
2022/07/12 17:49:12 NOTICE: bisync is EXPERIMENTAL. Don't use in production!
2022/07/12 17:49:12 DEBUG : Lock file created: /home/pi/.cache/rclone/bisync/onedrive_home_pi_oneDriveData..srv_dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80_Files.lck
2022/07/12 17:49:12 INFO  : Synching Path1 "onedrive:home/pi/oneDriveData/" with Path2 "/srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files/"
2022/07/12 17:49:12 DEBUG : Lock file removed: /home/pi/.cache/rclone/bisync/onedrive_home_pi_oneDriveData..srv_dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80_Files.lck
2022/07/12 17:49:12 ERROR : Bisync critical error: cannot find prior Path1 or Path2 listings, likely due to critical error on prior run
2022/07/12 17:49:12 ERROR : Bisync aborted. Must run --resync to recover.

Thanks for the help !

DO NOT MOUNT THEM. That is not how it works.

rclone bisync local: onedrive:

But you didn't specify your config so I am not sure what local: actually refers to.

Aside

Your text is in a CODE block making it very hard to read. In the future, pleasure look at the review to the right and make sure it is formatted properly.

Hi Guys,
I have a Raspberry Pi running Open Media vault to use as a NAS.
My goal is to have the folder "Files", that OMV made on my external disk connected to the pi, in sync with my online storage on OneDrive.

For this i wanted to use BiSync. As i understand it, you make two paths and then point them towards each other in the bisync command.
I succeed in making a connection to One drive and mounting it on a local made folder on my Pi.
I also made a local remote , that i can also mount using the option --allow-non-empty when pointed towards the "Files" folder.

However when i try to use the bisync command , as i think i need to, i always get an error that it cant find the path.
Maybe i am just interpreting it wrong, and making a stupid mistake.
I tried starting over again, this however does not seem to help. I also searched around, read the documentation..
The documentation seems clear, therefore i think i just wrongly interpret what is stated.
I have added output of my commands below.

1 Like

Hi Justin,

Thanks for the quick and good answer.
That made it work for me . I only had to put a path on the local side, and it seems to work.

 rclone bisync onedrive: local:PathToLocal  

Thanks for the help on this.

However when trying out if everything worked fine, i noticed the following.
If i make a file on the local side , its synced without any issue :

 pi@pinas:~ $ rclone bisync onedrive: local:/srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files -P 
2022/07/14 16:49:14 NOTICE: bisync is EXPERIMENTAL. Don't use in production!
Transferred:             27 B / 27 B, 100%, 13 B/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:         4.6s

But if i then adjust the file on the OneDrive site, it seems to have a problem when syncing again :

pi@pinas:~ $ rclone bisync onedrive: local:/srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files -P 
2022/07/14 16:50:10 NOTICE: bisync is EXPERIMENTAL. Don't use in production!
2022-07-14 16:50:13 ERROR : TextFileMadeLocal.txt: Failed to copy: chtimes /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files/TextFileMadeLocal.txt: operation not permitted
2022-07-14 16:50:13 ERROR : Bisync critical error: chtimes /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files/TextFileMadeLocal.txt: operation not permitted
2022-07-14 16:50:13 ERROR : Bisync aborted. Must run --resync to recover.
Transferred:             67 B / 67 B, 100%, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Checks:                 1 / 1, 100%

pi@pinas:~ $ rclone bisync onedrive: local:/srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files -P --resync 
2022/07/14 16:50:47 NOTICE: bisync is EXPERIMENTAL. Don't use in production!
2022-07-14 16:50:49 ERROR : TextFileMadeLocal.txt: Failed to set modification time: chtimes /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files/TextFileMadeLocal.txt: operation not permitted
2022-07-14 16:50:50 ERROR : Local file system at /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files: not deleting files as there were IO errors
2022-07-14 16:50:50 ERROR : Local file system at /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files: not deleting directories as there were IO errors
2022-07-14 16:50:50 ERROR : Bisync critical error: not deleting files as there were IO errors
2022-07-14 16:50:50 ERROR : Bisync aborted. Must run --resync to recover.
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Checks:                16 / 16, 100%

It looks like an error in the permissions or setting of the times.
I found a discussion on the forum about this, there a possible solution was to use --local-no-set-modtime.
But this obvious other errors, since bisync complains it has no times..

I took a look at permissions using ls -l , but i am not sure if this is correct or not:

drwxr-sr-x 2 pi     users   4096 Jul 14 15:45 Documents
drwxr-sr-x 4 pi     users   4096 Jul 14 15:45 TestFolder
-rw-rw-r-- 1 nobody users     67 Jul 14 16:50 TextFileMadeLocal.txt
-rw-rw-r-- 1 nobody users 356135 Jan  5  2022 simpson.jpg

Should you also here see the solution immediately , your help would be much appreciated.
Thanks again for the help,

Please post your config file. I suspect you are making some mistake in local:. Is that part of your config? Or are you trying to tell rclone that it is a local path?

If it is the latter, this is not the right way to do it. You should be doing just /path/to/local

1 Like

Hi Justin ,

These are the config paths :

pi@pinas:~ $ rclone config paths
Config file: /home/pi/.config/rclone/rclone.conf
Cache dir:   /home/pi/.cache/rclone
Temp dir:    /tmp

This is whats inside the rclone.conf file :

[onedrive]
type = onedrive
token = {"access_token":"Removed acces token"}
drive_id = "Removed drive_id"
drive_type = personal

[local]
type = local

When setting up local , i skipped the advanced config like recommended.

I also tested out what you said by just giving straight the /path/to/local instead of using local:.
Because i don't want to do any "special" configurations. I only want to have them in sync with OneDrive.

Making a file on Local and syncing works :

pi@pinas:~ $ rclone bisync onedrive: /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files -P 
2022/07/16 10:59:39 NOTICE: bisync is EXPERIMENTAL. Don't use in production!
Transferred:             36 B / 36 B, 100%, 7 B/s, ETA 0s
Checks:                 1 / 1, 100%
Transferred:            1 / 1, 100%
Elapsed time:         7.9s

However adjusting it on OneDrive, then gives the following .
But despite the errors in the following code, it worked. Adjusting the text file on OneDrive was indeed updated on local.

pi@pinas:~ $ rclone bisync onedrive: /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files -P 
2022/07/16 11:00:16 NOTICE: bisync is EXPERIMENTAL. Don't use in production!
2022-07-16 11:00:21 ERROR : FileMadeOnLocal.txt: Failed to copy: chtimes /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files/FileMadeOnLocal.txt: operation not permitted
2022-07-16 11:00:21 ERROR : Bisync critical error: chtimes /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files/FileMadeOnLocal.txt: operation not permitted
2022-07-16 11:00:21 ERROR : Bisync aborted. Must run --resync to recover.
Transferred:             60 B / 60 B, 100%, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Checks:                 1 / 1, 100%
Elapsed time:         4.9spi@pinas:~ $ rclone bisync onedrive: /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files -P --resync
2022/07/16 11:01:30 NOTICE: bisync is EXPERIMENTAL. Don't use in production!
2022-07-16 11:01:32 ERROR : FileMadeOnLocal.txt: Failed to set modification time: chtimes /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files/FileMadeOnLocal.txt: operation not permitted
2022-07-16 11:01:33 ERROR : Local file system at /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files: not deleting files as there were IO errors
2022-07-16 11:01:33 ERROR : Local file system at /srv/dev-disk-by-uuid-19cce74b-40d7-49e1-b824-6344e7ec3e80/Files: not deleting directories as there were IO errors
2022-07-16 11:01:33 ERROR : Bisync critical error: not deleting files as there were IO errors
2022-07-16 11:01:33 ERROR : Bisync aborted. Must run --resync to recover.
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Checks:                16 / 16, 100%
Elapsed time:         4.0spi@pinas:~ $ 

The other way around does not work, adjusting a file on local does not get updated. After resync the adjustment is gone.

Hope this is enough info.
Thanks !

This almost certainly means you do not have permissions on the local disk. That’s quite the local path. What is that? What system?

Can you modify files on that path manually?

1 Like

Hi Justin,

The drive is an external HDD connected to the Pi. When you are setting up OpenMediaVault it renames the drive to this strange path. Normally you never touch this because it only "lives" in open OMV.

Your response was completely correct. If i tried to preform a bisync connection to anywhere on my Pi except this external drive managed by OMV all worked fine.

For people stumbling on this topic later. To get it working i revisited the OMV setup page, and made sure all users got the permission to adjust files.
Secondly i run rclone as sudo , otherwise i still could not adjust things, and explicitly point to the config file i made for rclone.

sudo rclone --config= "Path to rclone.conf" bisync onedrive:   "Path to folder on external drive " -P

Thanks for all the help !

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.