SugarSync – issue accessing different device backups

What is the problem you are having with rclone?

In SugarSync I have backed up a number of devices (laptops), each of these have a ‘My Documents’ folder.

When I use lsd to list directories, it lists multiple instances of 'My Documents' but there is no way to differentiate them:

-1 2022-02-06 12:19:51        -1 My Documents
-1 2022-02-06 12:19:51        -1 My Documents
-1 2022-02-06 12:19:51        -1 My Documents
-1 2022-02-06 12:19:51        -1 My Documents
-1 2022-02-06 12:19:51        -1 My Documents
-1 2022-02-06 12:19:51        -1 My Documents

If I use ls remote:”My Documents” it lists the all the files from just one of the laptops.

On the SugarSync web interface it lists the laptop name in a grey box.

Is there anyway on rclone to determine which ‘My Documents’ is associated with these laptops and list/copy from a specific one?

I’m not sure if this is a limitation of SugarSync? Any assistance would be much appreciated. Many thanks.

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

rclone v1.57.0
- os/version: Microsoft Windows 10 Enterprise 2009 (64 bit)
- os/kernel: 10.0.19043.1466 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.17.2
- go/linking: dynamic
- go/tags: cmount

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

SugarSync

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

rclone lsd remote:

The rclone config contents with secrets removed.

[remote]
type = sugarsync
username = 
refresh_token = <REDACTED>
authorization_expiry = 2022-02-06T05:26:49-08:00
user = https://api.sugarsync.com/user/<REDACTED>
root_id = https://api.sugarsync.com/user/<REDACTED>/folders
deleted_id = https://api.sugarsync.com/folder/:sc:<REDACTED>:9

A log from the command with the -vv flag

2022/02/06 12:30:43 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "lsd" "remote:" "-vv"]
2022/02/06 12:30:43 DEBUG : Creating backend with remote "remote:"
2022/02/06 12:30:43 DEBUG : Using config file from "C:\\Users\\Kevin\\AppData\\Roaming\\rclone\\rclone.conf"
          -1 2022-02-06 12:30:44        -1 Desktop
          -1 2022-02-06 12:30:44        -1 Desktop
          -1 2022-02-06 12:30:44        -1 Desktop
          -1 2022-02-06 12:30:44        -1 Documents
          -1 2022-02-06 12:30:44        -1 Documents
          -1 2022-02-06 12:30:44        -1 Magic Briefcase
          -1 2022-02-06 12:30:44        -1 Mobile Photos
          -1 2022-02-06 12:30:44        -1 My Documents
          -1 2022-02-06 12:30:44        -1 My Documents
          -1 2022-02-06 12:30:44        -1 My Documents
          -1 2022-02-06 12:30:44        -1 My Documents
          -1 2022-02-06 12:30:44        -1 My Documents
          -1 2022-02-06 12:30:44        -1 My Documents
          -1 2022-02-06 12:30:44        -1 My Pictures
          -1 2022-02-06 12:30:44        -1 My Pictures
          -1 2022-02-06 12:30:44        -1 My Pictures
          -1 2022-02-06 12:30:44        -1 Photo
          -1 2022-02-06 12:30:44        -1 Protected Folders
          -1 2022-02-06 12:30:44        -1 PycharmProjects
          -1 2022-02-06 12:30:44        -1 PycharmProjects
          -1 2022-02-06 12:30:44        -1 <REDACTED>
          -1 2022-02-06 12:30:44        -1 Web Archive
          -1 2022-02-06 12:30:44        -1 iPhone Sync
2022/02/06 12:30:44 DEBUG : 2 go routines active

I"m not super familiar with that backend, but seems like you can have duplicates.

Rclone isn't expecting that and you can use rclone dedupe to clean them up (Warning: I'm not sure what that does with other things using it as I've only used it with Google Drive).

Thank you, the duplicates are intentional, they are the same standard folder i.e. 'My Documents' on different devices (laptops). On the SugarSync API documentation [LINK] it states:

Workspace. A collection that corresponds to a device, such as a laptop or desktop computer, in the user's SugarSync account. A workspace contains the folders, and the files within those folders, that a user has added to SugarSync from a particular device or synced locally to the device using the client software.

It seems that these are not differentiated by Workspace/device when returned by rclone.

Thanks.

If you can find the ID of the folder, then you can set it in the config.

Something like this

List the IDs of the folders

$ rclone lsf --csv -F ip TestSugarSync:
https://api.sugarsync.com/folder/:sc:9068489:215_1742684206,2001test/
https://api.sugarsync.com/folder/:sc:9068489:215_1776976813,2001test-2/
https://api.sugarsync.com/folder/:sc:9068489:2,My SugarSync/
https://api.sugarsync.com/folder/:sc:9068489:32,Protected Folders/
https://api.sugarsync.com/folder/:sc:9068489:215_1742680082,Test/
https://api.sugarsync.com/folder/:sc:9068489:215_1742677501,rclone-info/

Then take the ID of the folder you want and put it into --sugarsync-root-id

$ rclone lsf --sugarsync-root-id "https://api.sugarsync.com/folder/:sc:9068489:215_1742684206" TestSugarSync:
2001-05-24-dir1/
2001-05-25-dir2/

What do you think rclone should do? Suffix the names with the workspace ID or something like that? All the names have to be unique for rclone to use them.

Thank you, that works great.

Maybe prefix it with the Workspace ID, however this would not identify the actual 'friendly' name of the device (mine are named after the laptop that is backed up). I'm not sure there is even a way of determining this? (the API reference does mention 'displayName' as the 'The user-visible name of the workspace').

But to be honest I am not sure if is worth you spending any time on it, I feel SugarSync is a bit of an edge case…!

Thanks again for your help, much appreciated.

Ok! Glad we've found a work-around.

Note that you can set aliases for these if you use them a lot, something like

[machine1backup]
type = alias
remote = TestSugarSync,root_id="https://api.sugarsync.com/folder/:sc:9068489:215_1742684206":

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