In order to add Google Drive (grive) to your linux server, firstly you should install “add-apt-repository” command using the following command:
apt-get install python-software-properties apt-get install software-properties-common
Once installed, run the following commands:
add-apt-repository ppa:nilarimogard/webupd8 aptitude update aptitude install -y grive
Once grive is installed, make GoogleDrive folder on desired location. Navigate to that folder and run the following command:
root@server0:~/GoogleDrive# grive -a
After running the above command, a Google URL will be displayed. Copy the URL and paste it in you web browser (make sure you’re logged in into Google account). Once you’re authenticated, you will get a confirmation code. Copy the code and paste it in the prompt on your server.
To synchronize your files, run the following command (make sure you are inside your local GoogleDrive folder:
In case you notice that grive is failing with the following error:
exception: /build/buildd/grive-0.3.0/libgrive/src/protocol/AuthAgent.cc(174): Throw in function long int gr::AuthAgent::CheckHttpResponse(long int, const string&, const gr::http::Header&) Dynamic exception type: boost::exception_detail::clone_impl<gr::http::Error> std::exception::what: std::exception [gr::http::HttpResponseTag*] = 403 [gr::http::UrlTag*] = https://docs.google.com/feeds/upload/create-session/default/private/full/folder%XXXXXXXXXXXXXXXXXXXXXX/contents?convert=false&upload_id=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX [gr::http::HeaderTag*] = Expect: Accept: Authorization: Bearer (hidden) GData-Version: 3.0
Your GDrive is full and that is why backup is throwing an error. You need to delete files from your GDrive in order to resume normal operation.