My cloud files dissapear at every restart

Hello rClone forum members. I need your Help

Let me start my saying that I am new to Linux, Terminal, Bash and rclone. I would like to escape from Windows (tm)
I have a PC and a Labtop and I use both for work. Also, for the time being I am using dual boot on my PC. I heve several Cloud services I use to keep the various parts od my online life and work organized ans synced between my devices.

I want to sync my Cloud accounts on Linux using rclone - this alows me to use just one app to keep everything up to date in both directions. (I mean - Download new files I create on my Labtop, and upload the work I do on my PC)

I am Using Nobara 39 KDS Plasma, I installed rClone version 1.65.2

...
rclone v1.65.2

  • os/version: nobara 39 (64 bit)
  • os/kernel: 6.7.0-204.fsync.fc39.x86_64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.21.6
  • go/linking: static
  • go/tags: none
    ...

I had no problem creating remotes for OneDrive, Dropbox, Mega and Google Drive - I was not able to get Proton Drive to work, as it needs and extra encription password I have idea how to add.

My redacted rclone.config file looks like this:

...
[MarcsDropbox]
type = dropbox
token = XXX

[MarcsGoogleDrive]
type = drive
scope = drive
token = XXX
team_drive =

[MarcsMega]
type = mega
user = XXX
pass = XXX

[MarcsOneDrive]
type = onedrive
token = XXX
drive_id = XXX
drive_type = personal

[MarcsProton]
type = protondrive
username = parapouparpapel
password = XXX
client_uid =
client_access_token =
client_refresh_token =
client_salted_key_pass =
2fa =
...

Next I Mounted the remotes using these commands:
...
rclone --vfs-cache-mode writes mount MarcsOneDrive: ~/OneDrive &
rclone --vfs-cache-mode writes mount MarcsDropbox: ~/Dropbox &
rclone --vfs-cache-mode writes mount MarcsMega: ~/MEGA &
rclone --vfs-cache-mode writes mount MarcsGoogleDrive: ~/GoogleDrive &
rclone --vfs-cache-mode writes mount MarcsProton: ~/Proton &
...

Proton didn't work. But that is not my main issue.

At this point I understood that I needed to create a way to update my files periodically, after searching and following a tutorial I created a .sh file that looks like this:

...
#!/bin/bash

Set the paths to my local and remote directories

local_path1=/home/marc/OneDrive/
remote_path1=MarcsOneDrive:/
local_path2=/home/marc/Dropbox/
remote_path2=MarcsDropbox:/
local_path3=/home/marc/MEGA/
remote_path3=MarcsMega:/
local_path4=/home/marc/GoogleDrive/
remote_path4=MarcsGoogleDrive:/
local_path5=/home/marc/Proton/
remote_path5=MarcsProton:/

Run rclone bisync to sync with the clouds

rclone bisync --resync --syslog --verbose $remote_path1 $local_path1 &
rclone bisync --resync --syslog --verbose $remote_path2 $local_path2 &
rclone bisync --resync --syslog --verbose $remote_path3 $local_path3 &
rclone bisync --resync --syslog --verbose $remote_path4 $local_path4 &
rclone bisync --resync --syslog --verbose $remote_path5 $local_path5 &

the Logfile

echo "Sync completed at $(date)" >> /home/marc/.config/rclone/logfiles/cloudsync-batch_logfile.log
...

the I set up cron to run this script every 15 minutes with
...
*/15 * * * * /home/marc/sh/cloudsync-batch.sh
...

I was happy with this and it seemed to be working. I tested it by creating files on my PC and seeing the files in the Webapps of my clouds, and I created files in the webapps and they synced on my computer. so this looked good.

Today I restarted the computer and my local Cloud folders are empty exept for one Drive... what happened? What do I need to do to have my cloud storage locally stored and synced?

Can you help?

I have a second question: Until now I have been using local paths on my Linux Drive, but realy I have a second harddrive on m,y computer just for Data, and there I have these cloudstorage folders stores from my Dual boot Windows OS - Is it possible to sync the same folders in Linux as well? It should be, right? It's the same files...

Thank you for your time. and sorry for the Verbose Noob question...

M.

What do you use bisync for? You do not need it....

You mount your onedrive:

rclone --vfs-cache-mode writes mount MarcsOneDrive: /home/marc/OneDrive

and then sync it with itself....

rclone bisync --resync --syslog --verbose MarcsOneDrive: /home/marc/OneDrive/

in addition you are supposed to use --resync flag only once - to initiate bisync. Subsequent runs should not use this flag.

But in your case just forget using bisync - I do not see what do you need it for.

Now some basics - onedrive, gdrive and dropbox should be used with their own client_ids. Check documentation e.g. for onedrive it is here. Then recreate your remotes using client/secret you generate.

For mounting instead of:

rclone --vfs-cache-mode writes mount MarcsOneDrive: ~/OneDrive &

I suggest you learn and use systemd services. Google will give you many examples.

For further discussion just use one remote as an example. All together is too much:)

Thanks kapitainsky, I will need some time to digest your answer, specially the systemd service thing. Let's see if i can manage.
Thanks for now.