This is similar to a previous discussion of this error when rclone encounters a (broken) shortcut object that it can't follow to a destination. However, in my case the shortcuts are not actually dangling / broken, I just don't have access to the destination file. Here's a picture so you can see what I mean:
I'm using rclone to backup a shared drive used by lots of people. Several people have made use of the shortcut feature to link off to private / sensitive files that are not in the shared drive. It's a legitimate use of shortcuts. Due to the sensitive nature of the files and the fact that they're not in the shared drive, they shouldn't be copied.
The problem is that, while rclone is able to copy all the other files, it won't do the delete / cleanup step at the end, which means the backup is full of redundant data. Due to the size of the shared drive, it's not practical to wipe it and start over each time - we're talking days to do a full backup vs. minutes to do an incremental one.
Some options I've thought about:
-
Disabling shortcuts. I can't find a way to do this in Google Workspace Admin - after doing a few Google searches I found a couple of threads that say it's not possible.
-
Manually removing shortcuts, potentially temporarily for the duration of the backup. This will get harder as the number of people and shortcuts increases over time.
-
Posting here. I'm wondering if there's a way to catch this case of the error and either ignore it or downgrade it to a warning a la "Duplicate object found in source".
Does anyone have any other suggestions?
Run the command 'rclone version' and share the full output of the command.
rclone v1.57.0
- os/version: darwin 11.6.2 (64 bit)
- os/kernel: 20.6.0 (x86_64)
- os/type: darwin
- os/arch: amd64
- go/version: go1.17.2
- go/linking: dynamic
- go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
Google Drive (shared drive)
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
./rclone sync Admin: /Volumes/Admin\ Drive -P
The rclone config contents with secrets removed.
[Admin]
type = drive
scope = drive.readonly
token = {"access_token":"***","token_type":"Bearer","refresh_token":"***","expiry":"2022-02-18T09:44:24.182131Z"}
team_drive = ***
root_folder_id =
A log from the command with the -vv
flag
I've redacted logs for other files.
2022/02/18 08:44:58 DEBUG : rclone: Version "v1.57.0" starting with parameters ["./rclone" "sync" "Admin:" "/Volumes/Admin Drive" "-vv" "--log-file" "log.txt"]
2022/02/18 08:44:58 DEBUG : Creating backend with remote "Admin:"
2022/02/18 08:44:58 DEBUG : Using config file from "/Users/ben/.config/rclone/rclone.conf"
2022/02/18 08:44:58 DEBUG : Creating backend with remote "/Volumes/Admin Drive"
2022/02/18 08:44:59 DEBUG : README.docx: Size and modification time the same (differ by 0s, within tolerance 1ms)
2022/02/18 08:44:59 DEBUG : README.docx: Unchanged skipping
...
2022/02/18 08:45:00 NOTICE: Dangling shortcut "Events Archive" detected
2022/02/18 08:45:00 ERROR : Roles and teams/Events Team/Events Archive: Failed to copy: failed to open source object: can't read dangling shortcut
...
2022/02/18 08:46:54 NOTICE: Dangling shortcut "Events Archive" detected
2022/02/18 08:46:54 ERROR : Roles and teams/Events Team/Events Archive: Failed to copy: failed to open source object: can't read dangling shortcut
...
2022/02/18 08:48:57 NOTICE: Dangling shortcut "Events Archive" detected
2022/02/18 08:48:57 ERROR : Roles and teams/Events Team/Events Archive: Failed to copy: failed to open source object: can't read dangling shortcut
...
2022/02/18 08:51:07 DEBUG : Local file system at /Volumes/Admin Drive: Waiting for checks to finish
2022/02/18 08:51:07 DEBUG : Local file system at /Volumes/Admin Drive: Waiting for transfers to finish
2022/02/18 08:51:07 ERROR : Local file system at /Volumes/Admin Drive: not deleting files as there were IO errors
2022/02/18 08:51:07 ERROR : Local file system at /Volumes/Admin Drive: not deleting directories as there were IO errors
2022/02/18 08:51:07 ERROR : Attempt 3/3 failed with 1 errors and: failed to open source object: can't read dangling shortcut
2022/02/18 08:51:07 INFO :
Transferred: 30.118 MiB / 30.118 MiB, 100%, 327.253 KiB/s, ETA 0s
Errors: 1 (retrying may help)
Checks: 32055 / 32055, 100%
Transferred: 12 / 12, 100%
Elapsed time: 6m8.9s
2022/02/18 08:51:07 DEBUG : 20 go routines active
2022/02/18 08:51:07 Failed to sync: failed to open source object: can't read dangling shortcut