git-annex-remote-rclone icon indicating copy to clipboard operation
git-annex-remote-rclone copied to clipboard

Support tree-export?

Open liljenstolpe opened this issue 5 years ago • 7 comments

I've been using rclone with Google Drive Team/Shared drives as a backing store for my image archive - thank you VERY much for the work.

I was also using the gdrive remote to generate a treeish export. With gdrive remote now being locked out of the Google API, it would be nice (and simpler), if we could get treeish exports using rclone. Any thoughts?

liljenstolpe avatar May 27 '20 17:05 liljenstolpe

I'm very glad it has been useful for you.

I am a little bit out of the loop here -- life has been keeping me busy and this project hasn't really gotten much attention from me in a while. When I last looked I don't think treeish exports were a thing and I'm not sure how they are implemented or what class of problems they are meant to solve.

While I'm not exactly clear the problem you are trying to solve or how, I suspect a simple solution that would work with this project as-is is as follows:

  1. Use a supported mechanism for accessing Google Drive (perhaps their official clients?).
  2. Configure an rclone remote in 'local' mode pointed at the mount created by the official client.

If Google is going down the ugly path it sounds like you are describing, then the solution I would most like to see is somebody extracting the API keys out of the official client and simply compiling rclone using those keys (plus perhaps a configurable User-Agent or whatever else is necessary for it to work in an interoperable way). A suitable API target should be one that Google would find most diffficult to deprecate without an outrageous result for their paying customers. The published documents for how third parties should integrate are probably the paths most prone to breakage and least worthy of implementation efforts.

DanielDent avatar May 27 '20 22:05 DanielDent

@liljenstolpe Just to clarify: git-annex-remote-googledrive has not been locked out by Google. They just show an ugly warning message when trying to authorize a new client, but you can still click on Advanced -> Go to git-annex-remote-googledrive (unsafe) (Which is not actually unsafe). I'm still going to try and get the application verified, so they don't show the warning anymore. Also, I'm soon going to add the possibility to use one's own API keys (which btw is also recommended when using rclone).

Lykos153 avatar May 27 '20 22:05 Lykos153

@lykos153 Yes, I use my own API keys on rclone. When I try and do

$ git-annex-remote-googledrive setup

I get the following web page, with no chance to select an unsafe, or advanced option. This is with a gsuite account, but I am the gsuite account owner, and have opened all the possible permissions in this area...

20200528_17h09m37s_grim

liljenstolpe avatar May 29 '20 00:05 liljenstolpe

Curious. I still can skip this. However, I released version 1.1 which allows to add one's own API key during setup. That should let you continue to use your gsuite account for the export remote. If not, I suggest we move the discussion here.

Lykos153 avatar Jun 01 '20 13:06 Lykos153

Thank's @Lykos153, I will try that and update on that linked discussion.

@DanielDent - if you really want a directory that isn't symlinks somwhere as, say a read-only archive. Call it belt & braces.

liljenstolpe avatar Jun 04 '20 21:06 liljenstolpe

FWIW, I would like to see git-annex-remote-rclone support tree-export even if google-drive stops being a viable option for users. The feature itself could still be useful, even if google-drive isn't.

daraul avatar Apr 23 '22 13:04 daraul

Given the number of things rclone supports, I imagine this feature would be useful in a number of other ways.

See here for documentation of how a remote can support tree export: https://git-annex.branchable.com/design/external_special_remote_protocol/export_and_import_appendix/

joeyh avatar May 02 '22 18:05 joeyh