New files are not displayed on the NAS

At first sorry for my bad english , i´m German and hope some can help me here :wink:

What is the problem you are having with rclone?

Hello,
I have a problem that newly added files are not visible in the mounted folder on the NAS.

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

rclone v1.58.1

  • os/version: unknown
  • os/kernel: 4.4.59+ (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17.9
  • go/linking: static
  • go/tags: none

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

Google Drive

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

/usr/bin/rclone mount -v PlexDrive: /volume1/video/gdrive --log-file=/volume1/docker/rClone/config/log.txt --allow-other --dir-cache-time 672h --vfs-cache-max-age 675h --vfs-read-chunk-size 64M --vfs-read-chunk-size-limit 1G --buffer-size 32M &

hello and welcome to the forum,

how are the new files added, from gdrive website, another instance of rclone or what?

and please post the log file.

Hello,

the files are transferred every night.

I have a local folder on my synology and every night with cloud sync a copy of the local file is moved to my google drive.

I have no logs for this

please describe in detail, exactly how the local files are uploaded to gdrive?
using the rclone mount or another command/process?

Hello,

the files are uploaded directly to the synology using a backup tool. The tool is called Cloud Sync.

There is another connection made with my googlde driver. This is not done via Rclone.

Rclone should actually only be able to read the files .

I have to say about this. That it worked until last week exactly the same -> However, with an older version of Rclone. But because I had to replace the token I did a Rclone update and followed these instructions: Remote Setup

and mount my google Drive back into my NAS.

Here is my log how I have mounted rclone

@Synology:~$ rclone config
Current remotes:

Name                 Type
====                 ====
PlexDrive            drive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> e                                                                Choose a number from below, or type in an existing value.
 1 > PlexDrive
remote> 1
--------------------
[PlexDrive]
type = drive
client_id = xxxx
client_secret = xxxx
scope = drive
token = {"xxxxx","expiry":"2022-05-22T20:38:29.3795093+02:00"}
team_drive =
auth_url = CSv
--------------------
Edit remote
Option client_id.
Google Application Client Id
Setting your own is recommended.
See https://rclone.org/drive/#making-your-own-client-id for how to create your own.
If you leave this blank, it will use an internal key which is low performance.
Enter a string value. Press Enter for the default (xxxxx).
client_id> xxxxxx
Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a string value. Press Enter for the default (xxxxx).
client_secret> xxxxxx
Option scope.
Scope that rclone should use when requesting access from drive.
Choose a number from below, or type in your own string value.
Press Enter for the default (drive).
 1 / Full access all files, excluding Application Data Folder.
   \ (drive)
 2 / Read-only access to file metadata and file contents.
   \ (drive.readonly)
   / Access to files created by rclone only.
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ (drive.file)
   / Allows read and write access to the Application Data folder.
 4 | This is not visible in the drive website.
   \ (drive.appfolder)
   / Allows read-only access to file metadata but
 5 | does not allow any access to read or download file content.
   \ (drive.metadata.readonly)
scope> 1
Option root_folder_id.
ID of the root folder.
Leave blank normally.
Fill in to access "Computers" folders (see docs), or for rclone to use
a non root folder as its starting point.
Enter a value. Press Enter to leave empty.
root_folder_id>
Option service_account_file.
Service Account Credentials JSON file path.
Leave blank normally.
Needed only if you want use SA instead of interactive login.
Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.
Enter a value. Press Enter to leave empty.
service_account_file>
Edit advanced config?
y) Yes
n) No (default)
y/n> n
Already have a token - refresh?
y) Yes (default)
n) No
y/n> y
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine

y) Yes (default)
n) No
y/n> n
Option config_token.
For this to work, you will need rclone available on a machine that has
a web browser available.
For more help and alternate methods see: xxxxxx
Execute the following on the machine with the web browser (same rclone
version recommended):
        rclone authorize "drive" "xxxxxxxxxxxxxxxxx"
Then paste the result.
Enter a value.
config_token> {"xxxxxxx","expiry":"2022-05-23T15:15:01.7672307+02:00"}
Configure this as a Shared Drive (Team Drive)?

y) Yes
n) No (default)
y/n> n
--------------------
[PlexDrive]
type = drive
client_id = xxxxx
client_secret = xxxx
scope = drive
token = {"access_token":xxxxxx","expiry":"2022-05-23T15:15:01.7672307+02:00"}
team_drive =
auth_url = CSv
--------------------
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
Current remotes:

Name                 Type
====                 ====
PlexDrive            drive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q>

best to use a debug log, add --log-level=DEBUG the rclone mount command.
and to delete the /volume1/docker/rClone/config/log.txt before running rclone mojunt

it is common to pre-cache the dir/file info after the rclone mount is started

  1. to the mount command, add --rc --poll-interval=20s

  2. after the rclone mount is running, then execute
    rclone rc vfs/refresh recursive=true -vv

  3. look into the debug log for issues.

i get an error :

@Synology:~$ rclone mount -v PlexDrive: /volume1/video/gdrive --log-level=DEBUG --allow-other --dir-cache-time 672h --vfs-cache-max-age 675h --vfs-read-chunk-size 64M --vfs-read-chunk-size-limit 1G --rc --poll-interval=20s --buffer-size 32M &
[1] 8597
@Synology:~$ 2022/05/23 16:18:19 Can't set -v and --log-level

need to remove -v

If i use my old Command i get an logfile . In this i have this Error:

2022/05/23 16:21:27 Failed to create file system for "PlexDrive:": couldn't find root directory ID: Get "https://www.googleapis.com/drive/v3/files/root?alt=json&fields=id&prettyPrint=false&supportsAllDrives=true": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect PlexDrive:": oauth2: cannot fetch token: 401 Unauthorized
Response: {
  "error": "deleted_client",
  "error_description": "The OAuth client was deleted."
}

If i remove -v

2022/05/23 16:23:21 DEBUG : rclone: Version "v1.58.1" starting with parameters ["/usr/bin/rclone" "mount" "PlexDrive:" "/volume1/video/gdrive" "--log-level=DEBUG" "--allow-other" "--dir-cache-time" "672h" "--vfs-cache-max-age" "675h" "--vfs-read-chunk-size" "64M" "--vfs-read-chunk-size-limit" "1G" "--rc" "--poll-interval=20s" "--buffer-size" "32M"]
2022/05/23 16:23:21 NOTICE: Serving remote control on http://localhost:5572/
2022/05/23 16:23:21 DEBUG : Creating backend with remote "PlexDrive:"
2022/05/23 16:23:21 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2022/05/23 16:23:21 DEBUG : PlexDrive: Loaded invalid token from config file - ignoring
2022/05/23 16:23:21 DEBUG : PlexDrive: Token refresh failed try 1/5: oauth2: cannot fetch token: 401 Unauthorized
Response: {
  "error": "deleted_client",
  "error_description": "The OAuth client was deleted."
}
2022/05/23 16:23:22 DEBUG : PlexDrive: Loaded invalid token from config file - ignoring
2022/05/23 16:23:22 DEBUG : PlexDrive: Token refresh failed try 2/5: oauth2: cannot fetch token: 401 Unauthorized
Response: {
  "error": "deleted_client",
  "error_description": "The OAuth client was deleted."
}
2022/05/23 16:23:23 DEBUG : PlexDrive: Loaded invalid token from config file - ignoring
2022/05/23 16:23:23 DEBUG : PlexDrive: Token refresh failed try 3/5: oauth2: cannot fetch token: 401 Unauthorized
Response: {
  "error": "deleted_client",
  "error_description": "The OAuth client was deleted."
}

i would re-create the PlexDrive remote using rclone config

and better to test using rclone lsd PlexDrive: -vv, instead of rclone mount ...

Ok i have make a complete new Drive Calls Plex

Sorry i´ve never worked with it. Could you give me a example how it works ?

https://rclone.org/commands/rclone_lsd/

rclone lsd Plex: -vv


Hohenbostler@Synology:~$ rclone lsd Plex: -vv
2022/05/23 16:41:29 DEBUG : rclone: Version "v1.58.1" starting with parameters ["rclone" "lsd" "Plex:" "-vv"]
2022/05/23 16:41:29 DEBUG : Creating backend with remote "Plex:"
2022/05/23 16:41:29 DEBUG : Using config file from "/var/services/homes/Hohenbostler/.config/rclone/rclone.conf"
2022/05/23 16:41:29 Failed to create file system for "Plex:": drive: failed when making oauth client: failed to create oauth client: empty token found - please run "rclone config reconnect Plex:"
Hohenbostler@Synology:~$


so you must a desktop that can run a web browser, and are using that to create the rclone remotes, correct?

Hi thats correct.

I have putty to connect to my NAS -> with rClone i will cofigure like u see above.

And then i have Windows 10 PC with Rclone -> in the Command line i write ```
rclone authorize "drive"

After Access the Webbrowser

i get an token and copy him to the putty session in field for the token.

there are two ways for remote setup, i suggest you try the other method
https://rclone.org/remote_setup/#configuring-by-copying-the-config-file

run rclone config on the windows computer, create the remote and test it.
once that is working, copy the rclone.conf file from windows to synbox.

ok i did it . Now i think the conf will work.

Hohenbostler@Synology:~$ rclone lsd Plex: -vv
2022/05/23 17:17:31 DEBUG : rclone: Version "v1.58.1" starting with parameters ["rclone" "lsd" "Plex:" "-vv"]
2022/05/23 17:17:31 DEBUG : Creating backend with remote "Plex:"
2022/05/23 17:17:31 DEBUG : Using config file from "/var/services/homes/Hohenbostler/.config/rclone/rclone.conf"
          -1 2020-11-11 14:55:49        -1 @SynologyCloudSync
          -1 2021-11-21 18:23:42        -1 Backups
          -1 2020-11-08 10:40:36        -1 Videos
2022/05/23 17:17:31 DEBUG : 4 go routines active
Hohenbostler@Synology:~$

But what is to to next ?

How to mount the Drive ? Where i can fint it ?

good,
now try your rclone mount command