Настройка соединения rclone с Диском Google (Google Drive))


Вводимые команды отображены красным, пояснения – курсивом в скобках.

Для каждой новой настройки подключения необходимо указать новое подключение и задать имя подключения ( name> ). Имя задаётся то, которое выберете сами.

rclone config
Current remotes:
...
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n
name> (укажите имя подключения)

В настройках доступа для Google Drive будет очень много вопросов. Несмотря на то, что в большинстве случаев достаточно просто ввести Enter, постарайтесь, всё-таки, отнестись к ним более внимательно, чем ко всем остальным облакам 

После ввода имени соединения необходимо цифрой указать облачное хранилище, на которое далее будет настраиваться rclone, например:



Storage> 13
(указанный номер соответствует версии rclone 1.51, у Вас он м.б. другим)
** See help for onedrive backend at: https://rclone.org/onedrive/ **

Google Application Client Id
Setting your own is recommended.
See https://rclone.org/drive/#making-your-own-client-id for how to create your own.
If you leave this blank, it will use an internal key which is low performance.
Enter a string value. Press Enter for the default ("").
client_id>  (просто Enter)
Google Application Client Secret
Setting your own is recommended.
Enter a string value. Press Enter for the default ("").
client_secret>  (просто Enter)
Scope that rclone should use when requesting access from drive.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / Full access all files, excluding Application Data Folder.
   \ "drive"  (полный доступ ко всем файлам, включая папку Application Data Folder)
 2 / Read-only access to file metadata and file contents.
   \ "drive.readonly"
   / Access to files created by rclone only.
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ "drive.file"
   / Allows read and write access to the Application Data folder.
 4 | This is not visible in the drive website.
   \ "drive.appfolder"
   / Allows read-only access to file metadata but
 5 | does not allow any access to read or download file content.
   \ "drive.metadata.readonly"
scope> 1
ID of the root folder
Leave blank normally.

Fill in to access "Computers" folders (see docs), or for rclone to use
a non root folder as its starting point.

Note that if this is blank, the first time rclone runs it will fill it
in with the ID of the root folder.

Enter a string value. Press Enter for the default ("").
root_folder_id>  (просто Enter)
Service Account Credentials JSON file path
Leave blank normally.
Needed only if you want use SA instead of interactive login.
Enter a string value. Press Enter for the default ("").
service_account_file>  (просто Enter)
Edit advanced config? (y/n)  (редактирование расширенных настроек)
y) Yes
n) No
y/n> y
Only consider files owned by the authenticated user.
Enter a boolean value (true or false). Press Enter for the default ("false").
auth_owner_only>   (просто Enter)
Send files to the trash instead of deleting permanently.
Defaults to true, namely sending files to the trash.
Use `--drive-use-trash=false` to delete files permanently instead.
Enter a boolean value (true or false). Press Enter for the default ("true").
use_trash>   (просто Enter, для удаления мимо Корзины ввести --drive-use-trash=false)
Skip google documents in all listings.
If given, gdocs practically become invisible to rclone.
Enter a boolean value (true or false). Press Enter for the default ("false").
skip_gdocs>  (просто Enter)
Skip MD5 checksum on Google photos and videos only.

Use this if you get checksum errors when transferring Google photos or
videos.

Setting this flag will cause Google photos and videos to return a
blank MD5 checksum.

Google photos are identifed by being in the "photos" space.

Corrupted checksums are caused by Google modifying the image/video but
not updating the checksum.
Enter a boolean value (true or false). Press Enter for the default ("false").
skip_checksum_gphotos>    (просто Enter)
Only show files that are shared with me.

Instructs rclone to operate on your "Shared with me" folder (where
Google Drive lets you access the files and folders others have shared
with you).

This works both with the "list" (lsd, lsl, etc) and the "copy"
commands (copy, sync, etc), and with all other commands too.
Enter a boolean value (true or false). Press Enter for the default ("false").
shared_with_me>   (просто Enter)
Only show files that are in the trash.
This will show trashed files in their original directory structure.
Enter a boolean value (true or false). Press Enter for the default ("false").
trashed_only>  (просто Enter)
Comma separated list of preferred formats for downloading Google docs.
Enter a string value. Press Enter for the default ("docx,xlsx,pptx,svg").
export_formats>   (просто Enter)
Comma separated list of preferred formats for uploading Google docs.
Enter a string value. Press Enter for the default ("").
import_formats>  (просто Enter)
Allow the filetype to change when uploading Google docs (e.g. file.doc to file.docx). This will confuse sync and reupload every time.
Enter a boolean value (true or false). Press Enter for the default ("false").
allow_import_name_change>  (просто Enter, для перезаписи загружаемых файлов в Google docs ввести true. По умолчанию, то есть просто Enetr, для перезаписи файлов их старые версии  необходимо удалить, а новые версии загрузить)
Use file created date instead of modified date.,

Useful when downloading data and you want the creation date used in
place of the last modified date.

**WARNING**: This flag may have some unexpected consequences.

When uploading to your drive all files will be overwritten unless they
haven't been modified since their creation. And the inverse will occur
while downloading.  This side effect can be avoided by using the
"--checksum" flag.

This feature was implemented to retain photos capture date as recorded
by google photos. You will first need to check the "Create a Google
Photos folder" option in your google drive settings. You can then copy
or move the photos locally and use the date the image was taken
(created) set as the modification date.
Enter a boolean value (true or false). Press Enter for the default ("false").
use_created_date>  (просто Enter)
Size of listing chunk 100-1000. 0 to disable.
Enter a signed integer. Press Enter for the default ("1000").
list_chunk>  (просто Enter, будет соответствовать 1000)
Impersonate this user when using a service account.
Enter a string value. Press Enter for the default ("").
impersonate>  (просто Enter)
Use alternate export URLs for google documents export.,

If this option is set this instructs rclone to use an alternate set of
export URLs for drive documents.  Users have reported that the
official export URLs can't export large documents, whereas these
unofficial ones can.

See rclone issue [#2243](https://github.com/rclone/rclone/issues/2243) for background,
[this google drive issue](https://issuetracker.google.com/issues/36761333) and
[this helpful post](https://www.labnol.org/internet/direct-links-for-google-drive/28356/).
Enter a boolean value (true or false). Press Enter for the default ("false").
alternate_export>  (просто Enter)
Cutoff for switching to chunked upload
Enter a size with suffix k,M,G,T. Press Enter for the default ("8M").
upload_cutoff>  (просто Enter, будет соответствовать 8M)
Upload chunk size. Must a power of 2 >= 256k.

Making this larger will improve performance, but note that each chunk
is buffered in memory one per transfer.

Reducing this will reduce memory usage but decrease performance.
Enter a size with suffix k,M,G,T. Press Enter for the default ("8M").
chunk_size>  (просто Enter, будет соответствовать 8M)
Set to allow files which return cannotDownloadAbusiveFile to be downloaded.

If downloading a file returns the error "This file has been identified
as malware or spam and cannot be downloaded" with the error code
"cannotDownloadAbusiveFile" then supply this flag to rclone to
indicate you acknowledge the risks of downloading the file and rclone
will download it anyway.
Enter a boolean value (true or false). Press Enter for the default ("false").
acknowledge_abuse>  (просто Enter)
Keep new head revision of each file forever.
Enter a boolean value (true or false). Press Enter for the default ("false").
keep_revision_forever>  (просто Enter)
Show storage quota usage for file size.

The storage used by a file is the size of the current version plus any
older versions that have been set to keep forever.
Enter a boolean value (true or false). Press Enter for the default ("false").
size_as_quota>  (просто Enter)
If Object's are greater, use drive v2 API to download.
Enter a size with suffix k,M,G,T. Press Enter for the default ("off").
v2_download_min_size>  (просто Enter, будет соответствовать off)
Minimum time to sleep between API calls.
Enter a duration s,m,h,d,w,M,y. Press Enter for the default ("100ms").
pacer_min_sleep>  (просто Enter, будет соответствовать 100ms)
Number of API calls to allow without sleeping.
Enter a signed integer. Press Enter for the default ("100").
pacer_burst>  (просто Enter, будет соответствовать 100)
Allow server side operations (eg copy) to work across different drive configs.

This can be useful if you wish to do a server side copy between two
different Google drives.  Note that this isn't enabled by default
because it isn't easy to tell if it will work between any two
configurations.
Enter a boolean value (true or false). Press Enter for the default ("false").
server_side_across_configs>  (просто Enter, будет соответствовать "не использовать http2")
Disable drive using http2

There is currently an unsolved issue with the google drive backend and
HTTP/2.  HTTP/2 is therefore disabled by default for the drive backend
but can be re-enabled here.  When the issue is solved this flag will
be removed.

See: https://github.com/rclone/rclone/issues/3631

Enter a boolean value (true or false). Press Enter for the default ("true").
disable_http2> (просто Enter, будет соответствовать true)
Remote config
Use auto config?  (использовать автонастройку?)
 * Say Y if not sure  (вводите y если не уверены)
 * Say N if you are working on a remote or headless machine
y) Yes
n) No
y/n> y
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=ow058... H28Lg
(если браузер не открыл ссылку выше, то введите её вручную)
Log in and authorize rclone for access
(разрешите доступ rclone)



Waiting for code...
Got code
Configure this as a team drive?  (настроить для командной работы?)
y) Yes
n) No
y/n> n
--------------------
[GDmono]  (это имя соединения)
type = drive
scope = drive
token = {"access_token":"ya29.Il- ... Gzyys","expiry":"2019-11-06T19:14:55.557334525+03:00"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y

1 комментарий:

  1. как же юзать браузер если в терминале удаленно делаешь?

    ОтветитьУдалить