0

I am using Ubuntu 16.04. I am trying to sync my Google drive using grive2 in a way that only a specific folder is treated as my root folder in Google Drive i.e., only files and folders contained within the specified Google Drive folder are synced.

I am aware of the -p argument but for some reason I am not able to enter the correct path. Please can someone help.

I have tried the following commands.

grive -p ./my_directory -a  

grive -p ./"my_directory" -a  

grive -p "Id" -a #where ID is the id of the resource as per Google Drive API

Each of these is throwing the same error.

exception: /build/grive2-2Hxkkx/grive2-0.5.1/libgrive/src/util/File.cc(128): Throw in function void gr::File::Open(const boost::filesystem::path&, int, int)
Dynamic exception type: boost::exception_detail::clone_impl<gr::File::Error>
[gr::expt::BacktraceTag*] = #0 0x578d79 grive gr::Exception::Exception()
#1 0x580917 grive gr::File::Error::Error()
#2 0x57fd69 grive gr::File::Open(boost::filesystem::path const&, int, int)
#3 0x57fe82 grive gr::File::OpenForWrite(boost::filesystem::path const&, int)
#4 0x57fb89 grive gr::File::File(boost::filesystem::path const&, int)
#5 0x57f2cc grive gr::Config::Save()
#6 0x50b63d grive Main(int, char**)
#7 0x50c1e9 grive main
#8 0x7f885cad9830 /lib/x86_64-linux-gnu/libc.so.6 __libc_start_main
#9 0x50a4b9 grive _start

2, "No such file or directory"[boost::errinfo_file_name_*] = ./my_directory/.grive
[boost::errinfo_api_function_*] = open

I do not know how to specify the path argument.

0

I'm a bit confused by what you mean by "only a specific folder is treated as my root folder in Google Drive i.e., only files and folders contained within the specified Google Drive folder are synced".

Do you want:

a) my_directory = your google drive root, as I read the first part of your sentence or

b) my_directory = a folder named my_directory in google drive, how I read the second part.

This is how I achieve b) (in my case, my_directory is in ~/grive):

cd $HOME/grive
grive -s my_directory

I only had to use -a the first time btw.

  • by 'only a specific folder....' I mean that gdrive ignores all the other folders are higher in hierarchy from that folder and considers folders and files that are children of that specific folder. I don't think the your suggestion works for me because to use the -s argument I would have had to download the entire gdrive first. At least that is what my experience of using that argument has been so far – Rachit Kinger Feb 12 '18 at 5:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.