Difference between revisions of "GDrive"

From UFRC
Jump to navigation Jump to search
(Created page with "Category:Software Category:Transfer Data {|<!--CONFIGURATION: REQUIRED--> |{{#vardefine:app|GDrive}} |{{#vardefine:url|https://github.com/prasmussen/gdrive}} <!--CONFI...")
 
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:Software]]
 
[[Category:Software]]
[[Category:Transfer Data]]
+
[[Category:File Management]]
 +
[[Category:Utility]]
 
{|<!--CONFIGURATION: REQUIRED-->
 
{|<!--CONFIGURATION: REQUIRED-->
 
|{{#vardefine:app|GDrive}}
 
|{{#vardefine:app|GDrive}}
Line 14: Line 15:
 
|{{#vardefine:installation|}} <!--INSTALLATION-->
 
|{{#vardefine:installation|}} <!--INSTALLATION-->
 
|}
 
|}
 +
{|align=right
 +
  |__TOC__
 +
  |}
 
<!--BODY-->
 
<!--BODY-->
 
<!--Description-->
 
<!--Description-->
 
{{#if: {{#var: url}}|
 
{{#if: {{#var: url}}|
 
{{App_Description|app={{#var:app}}|url={{#var:url}}|name={{#var:app}}}}|}}
 
{{App_Description|app={{#var:app}}|url={{#var:url}}|name={{#var:app}}}}|}}
 +
 +
'''Notice:''' GDrive is deprecated and archived as of april, 2023. To access Google Drive or other cloud storage, use [[Rclone]]. Learn more [https://support.google.com/accounts/answer/12379384 here].
  
 
gdrive is a command line utility for interacting with Google Drive.  You can use this utility to transfer files between the HiPerGator environment and your UF-provided Google Drive storage.
 
gdrive is a command line utility for interacting with Google Drive.  You can use this utility to transfer files between the HiPerGator environment and your UF-provided Google Drive storage.
Line 33: Line 39:
 
<!--Run-->
 
<!--Run-->
 
{{#if: {{#var: exe}}|==Additional Information==
 
{{#if: {{#var: exe}}|==Additional Information==
 +
For information on accessing, authorizing, or removing access, view [[Managing GDrive Access]]
  
* Load the module and then initiate authentication using "gdrive about":
+
===GDrive commands===
$ module load gdrive/2.1.0
+
You can get a full list of available commands by typing "'''gdrive help'''" but example of the most common ones are:
$ gdrive about
 
 
 
* If authentication is needed (e.g. it is your first time using the module or your prior authentication has expired), you will then get the following prompt:
 
Authentication needed
 
Go to the following url in your browser:
 
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=...
 
Enter verification code:
 
 
 
{{ note|The URL in the example above is truncated to make these instructions easier to read. The actual URL you will see on your screen is much longer.  '''Make sure you select and copy all of it.'''}}
 
 
 
* Copy and paste the supplied URL into a browser on your desktop.
 
 
 
* Log into your '''UF Google account''' using your '''UF credentials'''.
 
 
 
* You will then be prompted that "project-367116221053 wants to access your Google Account...See, edit, create, and delete all of your Google Drive files".  Read the note below and, if you are comfortable with this, click [Allow].
 
 
 
{{ note|...explain account access for the project here... }}
 
  
* You will then be taken to a page with an authorization code on it.  Copy that code and paste it back in your HiPerGator session where it is waiting at the "Enter verification code:" prompt.
+
====List files currently in your Google Drive:====
 +
gdrive list
  
*
+
====Upload a file to your Google Drive:====
 +
gdrive upload /orange/yourgroup/yourusername/mydata/somefile.dat
  
 +
====Upload an entire directory to your Google Drive:====
 +
gdrive upload --recursive /orange/yourgroup/yourusername/mydata/
  
 +
====Download a file from your Google Drive to a specific directory:====
 +
gdrive download --path /orange/yourgroup/yourusername/mydata/ 1PrZieajI6P6ikl1zk1Zn4zRhXZMOhoDg
 +
#or alternatively: gdrive download query --path /orange/yourgroup/yourusername/mydata/ somefile.dat
 
|}}
 
|}}
 
<!--Job Scripts-->
 
<!--Job Scripts-->
Line 90: Line 87:
 
See the [[{{PAGENAME}}_Install]] page for {{#var: app}} installation notes.|}}
 
See the [[{{PAGENAME}}_Install]] page for {{#var: app}} installation notes.|}}
 
<!--Turn the Table of Contents and Edit paragraph links ON/OFF-->
 
<!--Turn the Table of Contents and Edit paragraph links ON/OFF-->
__NOTOC____NOEDITSECTION__
+
__NOEDITSECTION__

Latest revision as of 20:03, 5 October 2023

Description

GDrive website  

Notice: GDrive is deprecated and archived as of april, 2023. To access Google Drive or other cloud storage, use Rclone. Learn more here.

gdrive is a command line utility for interacting with Google Drive. You can use this utility to transfer files between the HiPerGator environment and your UF-provided Google Drive storage.

Environment Modules

Run module spider GDrive to find out what environment modules are available for this application.

System Variables

  • HPC_GDRIVE_DIR - installation directory
  • HPC_GDRIVE_BIN - executable directory

Additional Information

For information on accessing, authorizing, or removing access, view Managing GDrive Access

GDrive commands

You can get a full list of available commands by typing "gdrive help" but example of the most common ones are:

List files currently in your Google Drive:

gdrive list

Upload a file to your Google Drive:

gdrive upload /orange/yourgroup/yourusername/mydata/somefile.dat

Upload an entire directory to your Google Drive:

gdrive upload --recursive /orange/yourgroup/yourusername/mydata/

Download a file from your Google Drive to a specific directory:

gdrive download --path /orange/yourgroup/yourusername/mydata/ 1PrZieajI6P6ikl1zk1Zn4zRhXZMOhoDg
#or alternatively: gdrive download query --path /orange/yourgroup/yourusername/mydata/ somefile.dat