How to install GDrive on Ubuntu server

To use Google Drive as backup drive on your Ubuntu server, you will need to install grive. To install Google Drive (grive) to your server, first 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 the 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 into your 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 into the prompt on your server. To synchronize your files, run the following command (make sure you are inside your local GoogleDrive folder:

root@server0:~/GoogleDrive# grive

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&)\nDynamic exception type: boost::exception_detail::clone_impl<gr::http::Error>\nstd::exception::what: std::exception\n[gr::http::HttpResponseTag*] = 403\n[gr::http::UrlTag*] = https://docs.google.com/feeds/upload/create-session/default/private/full/folder%XXXXXXXXXXXXXXXXXXXXXX/contents?convert=false&upload_id=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n[gr::http::HeaderTag*] = Expect:\nAccept:\nAuthorization: Bearer (hidden)\nGData-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.

Leave a Reply 0

Your email address will not be published. Required fields are marked *