Hi! I am new to Rclone, and found it as a way to sync with a remote MS OneDrive folder. It works wonders, except for files leaked into the local OneDrive folder similarly randomly, which I'm not able to track down. I'd welcome any suggestion to debug this, I don't even know where to start.
What is the problem you are having with rclone?
I basically followed the instructions here to setup my OneDrive account. It works well, I can mount the OneDrive remote account into /home/mathieu/Public/OneDrive/.
(I have removed a bunch of --exclude of the same form, see full script below)
The sync starts well, files are copied on the remote OneDrive the way I expect, and I can check on the OneDrive account that it works. The sync should be around 110–120 GB.
However, every now and then, rclone will start copying many (all?) files locally in /home/mathieu/Public/OneDrive/ until my hard drive is full (for instance, I currently have about 70 GB free on a 200 GB HD). I then need to delete the duplicated files (with sudo rm -r /home/mathieu/Public/OneDrive/home/ because some of the copied content is owned by root).
Oddly, the script goes on as if nothing happened, and keep copying to the remote.
What is your rclone version (output from rclone version)
rclone v1.50.2
- os/arch: linux/amd64
- go version: go1.13.6
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Debian GNU/Linux 9.5 (stretch) [64 bit].
Which cloud storage system are you using? (eg Google Drive)
Microsoft OneDrive.
The command you were trying to run (eg rclone copy /tmp remote:tmp)
To see why a file is being copied, you'd have to post a debug log so you'd want to create the problem and share the log so we can help identify why it was being copied.
"mount the OneDrive remote account into /home/mathieu/Public/OneDrive/."
can you post that rclone mount command?
is there a reason you are using a mount instead of a simple rclone sync /path/to/local/folder onedrive:backup_home/
your command is sync /home/mathieu onedrive:backup_home/
if i understand what you are doing
you are mounting onedrive to a local folder and then syncing to onedrive, which is mounted as local storage, kind of a infinite loop
Ah, sorry I was not clear on that! I do not mount the remote to sync — I just meant that I am able to successfully mount the remote (using rclone mount) when I need it, as a proof that the OneDrive config works.
However, when the file duplication happens, sometimes after the beginning of the sync (with rclone sync), it does happen in the mount point.
(still checking if that happens with v1.51 as I write)
No, it is not. The rclone sync command is the only thing active from the rclone side of things. As a matter of fact, the /home/mathieu/Public/OneDrive/folder (the mount folder) is completely empty when I run the sync script. It only starts to fill up when files are leaking locally (this issue), sometimes hours after the beginning of the sync.
I have now a log file when this happened (with v1.51)… The entire file is ~60 MB, 400,000 lines. Any suggestion to share this? (the file leak occurred towards the end, but I don't have an exact time…)
rclone sync /home/mathieu onedrive:backup_home/
there is no way that a one-way sync from local to cloud would cause new files to appear in the local.
so either this is a major rclone bug or something else.
at one point, you did run a rclone mount pointing inside /home
perhaps there is a rclone mount running in the background.
and that rclone mount is pointed to a local folder under /home
that would explain how files in the cloud somehow end up in a local folder at the same time a rclone sync is running.
i am not a linux expert, but i would try ps -ef | grep rclone
Note that I stopped the script after I noticed the leak, so it stops abruptly before the end. The leak happened minutes before that (really not sure how much though).
strange that sometimes rclone can find the config file and other times not?
each time you run the rclone command, are you always running it from the same folder?
if rclone cannot find the config file, rclone might consider onedrive:backup_home/ to be a local folder, not a remote.
2020/05/21 20:15:42 DEBUG : Using config file from "/home/mathieu/.config/rclone/rclone.conf"
2020/05/21 23:35:07 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
2020/05/21 23:35:07 Failed to create file system for "onedrive:backup_home/": didn't find section in config file