I execute gdrive sync download --keep-remote --delete-extraneous --dry-run "<DIR_ID>" '/path/to/local/folder' and get:
Starting sync...
Provided id is not a sync root directory
What is a "sync root directory"? How to make a google drive directory syncable?
What is a "sync tag" mentioned in the readme? Ho can I set one?
@mvasin, i have the same problem. Can you solve this problem?
Me too. How does one create a syncable directory?
It seems you will need to sync from local to drive first in order to make the drive directory syncable. And the drive directory needs to be empty before you sync upload.
First you need to make a directory for syn.For example ,run command "gdrive mkdir sync" to make a folder named "sync" on your google drive.This command will return the id of the folder "sync". ......
I not sure what's being suggested here. Do I have download my entire drive before this tool starts working? I still get the same error.
I made the folder sync with mkdir and then moved everything from my folder I wanted to sync into the new sync folder and then renamed it. So I would have the correct name and the folder would be made by the program... FAILED :(
I've created a syncable directory (_named it "syncable"_) then I tried gdrive sync upload but it didn't work.
╰─$ gdrive sync list
Id Name Created
0Bz3LWCvhllF1aDEybkVWeWc syncable 2017-06-19 22:06:39
╰─$ touch test.md; gdrive sync upload test.md 0Bz3LWCvhllF1aDEybkVWeWc
Starting sync...
Collecting local and remote file information...
Found 0 local files and 0 remote files
Sync finished in 1.166304588s
╰─$ gdrive sync content 0Bz3LWCvhllF1aDEybkVWeWc
Id Path Type Size Modified
BUMP!
Any Update?
I wasn't able to figure this out, but I found an alternate client (requires GO though) that works as expected for this task: https://github.com/odeke-em/drive
Everybody come on this tool is very useful...
https://github.com/google/skicka
See my document
https://github.com/cyhsu/gdrive_doc
On Jan 25, 2018 8:43 PM, "Brent, Yang Bohan" notifications@github.com
wrote:
Everybody come on this tool is very useful...
https://github.com/google/skicka
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_google_skicka&d=DwMCaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=YQ0tm3_4m-nvkNyF3EnogA&m=bZzp89zs4rN3jP9fhIw2tf15XsdKJ2_siozMqa6N_LU&s=0KIIFRneTPah9itnu7aiVa5g17UwUbHDtHxDsUC9LMo&e=—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_prasmussen_gdrive_issues_205-23issuecomment-2D360668456&d=DwMCaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=YQ0tm3_4m-nvkNyF3EnogA&m=bZzp89zs4rN3jP9fhIw2tf15XsdKJ2_siozMqa6N_LU&s=_CBhGTnHkadHR6g3tvswuQtt0mjuSW8QuaZ2XBIWvQo&e=,
or mute the thread
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AFE7fbYvzNUIoJxeugPF25KRXP00lcptks5tOTvagaJpZM4KEV6Q&d=DwMCaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=YQ0tm3_4m-nvkNyF3EnogA&m=bZzp89zs4rN3jP9fhIw2tf15XsdKJ2_siozMqa6N_LU&s=qPap2qGSpODOBnYvGKNOdBORrY1By1V1bfVbFtxIQmA&e=
.
here is what you should did:
and well done, you did it.
ex:
$ mkdir test
$ gdrive upload -r test
Creating directory test
$ gdrive list -m 1
Id Name Type Size Created
1ehyF6B_H3FK3C9GVyDOpN4qImTiHkO2y test dir 2018-09-22 18:59:26
$ gdrive sync upload test 1ehyF6B_H3FK3C9GVyDOpN4qImTiHkO2y
Starting sync...
Collecting local and remote file information...
Found 0 local files and 0 remote files
Sync finished in 6.312699642s
$gdrive sync list
Id Name Created
1ehyF6B_H3FK3C9GVyDOpN4qImTiHkO2y test 2018-09-22 18:59:26
"Hope this helps"
These solutions aren't great because
gdrive, or or the Google REST API? If it's the REST API, can we make the directory sync-able? If it's gdrive, can we somehow create whatever the relevant metadata are?OK, it looks like there's an appProperty of "syncRoot" stored in the directories, and if that is not present, then we get this error.
Here's the code:
https://github.com/prasmussen/gdrive/blob/c3cbcceedd6beb1fcff30f06ea7be7c29558d181/drive/sync_upload.go#L126-L137
Line 126 sets the metadata property, and that we could easily do ourselves. But then there's
https://github.com/prasmussen/gdrive/blob/c3cbcceedd6beb1fcff30f06ea7be7c29558d181/drive/sync_upload.go#L131
... which I don't understand. Looks like it sets file properties on GDrive that are important to keeping the sync. But I don't see anything special being added, so maybe it's sufficient that we just set this property on the root directory and then we are able to sync.
Would agree with others this remains a useful feature. FWIW our use case is to ensure that we downloaded a very large Google Drive directory with many files on the order of GBs correctly. Thus far it sounds like suggestions are geared mostly for people uploading data, but I may be missing something here. Happy for any suggestions people might have. 😄
Most helpful comment
here is what you should did:
3.sync: gdrive sync upload [empty_directory_name] [Id_of_remote_empty_directory]
and well done, you did it.
ex:
$ mkdir test
$ gdrive upload -r test
Creating directory test
$ gdrive list -m 1
Id Name Type Size Created
1ehyF6B_H3FK3C9GVyDOpN4qImTiHkO2y test dir 2018-09-22 18:59:26
$ gdrive sync upload test 1ehyF6B_H3FK3C9GVyDOpN4qImTiHkO2y
Starting sync...
Collecting local and remote file information...
Found 0 local files and 0 remote files
Sync finished in 6.312699642s
$gdrive sync list
Id Name Created
1ehyF6B_H3FK3C9GVyDOpN4qImTiHkO2y test 2018-09-22 18:59:26
"Hope this helps"