{"id":823,"date":"2019-06-26T11:12:14","date_gmt":"2019-06-26T02:12:14","guid":{"rendered":"https:\/\/www.kwonline.org\/memo2\/?p=823"},"modified":"2019-06-26T11:12:14","modified_gmt":"2019-06-26T02:12:14","slug":"rclone-to-sync-google-drive-on-xubuntu-18-04","status":"publish","type":"post","link":"https:\/\/www.kwonline.org\/memo2\/2019\/06\/26\/rclone-to-sync-google-drive-on-xubuntu-18-04\/","title":{"rendered":"Xubuntu 18.04 \u3067 rclone \u3092\u4f7f\u3063\u3066Google\u30c9\u30e9\u30a4\u30d6\u3068\u540c\u671f\u3059\u308b"},"content":{"rendered":"<p>rclone\u3067Google\u30c9\u30e9\u30a4\u30d6\u3068\u30ed\u30fc\u30ab\u30eb\u3092\u540c\u671f\u3057\u305f\u306e\u3067\u30e1\u30e2\u3002<\/p>\n<p>apt\u3067rclone\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ sudo apt install rclone\n<\/pre>\n<p>\u305d\u308c\u304b\u3089rclone config\u3067\u521d\u671f\u8a2d\u5b9a\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ rclone config\n2019\/06\/26 10:48:23 NOTICE: Config file &quot;\/home\/hoge\/.config\/rclone\/rclone.conf&quot; not found - using defaults\nNo remotes found - make a new one\nn) New remote\nr) Rename remote\nc) Copy remote\ns) Set configuration password\nq) Quit config\nn\/r\/c\/s\/q&gt; n\n<\/pre>\n<p>\u65b0\u898f\u4f5c\u6210\u306f\u300cn\u300d<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nname&gt; Google\n<\/pre>\n<p>\u8a2d\u5b9a\u306e\u540d\u524d\u3092\u3064\u3051\u308b\u3002<br \/>\n\u308f\u304b\u308a\u3084\u3059\u304f\u300cGoogle\u300d<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nType of storage to configure.\nChoose a number from below, or type in your own value\n 1 \/ Amazon Drive\n   \\ &quot;amazon cloud drive&quot;\n 2 \/ Amazon S3 (also Dreamhost, Ceph, Minio)\n   \\ &quot;s3&quot;\n 3 \/ Backblaze B2\n   \\ &quot;b2&quot;\n 4 \/ Dropbox\n   \\ &quot;dropbox&quot;\n 5 \/ Encrypt\/Decrypt a remote\n   \\ &quot;crypt&quot;\n 6 \/ Google Cloud Storage (this is not Google Drive)\n   \\ &quot;google cloud storage&quot;\n 7 \/ Google Drive\n   \\ &quot;drive&quot;\n 8 \/ Hubic\n   \\ &quot;hubic&quot;\n 9 \/ Local Disk\n   \\ &quot;local&quot;\n10 \/ Microsoft OneDrive\n   \\ &quot;onedrive&quot;\n11 \/ Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)\n   \\ &quot;swift&quot;\n12 \/ SSH\/SFTP Connection\n   \\ &quot;sftp&quot;\n13 \/ Yandex Disk\n   \\ &quot;yandex&quot;\nStorage&gt; 7   \n<\/pre>\n<p>Google\u30c9\u30e9\u30a4\u30d6\u306f\u300c7\u300d<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nGoogle Application Client Id - leave blank normally.\nclient_id&gt; \nGoogle Application Client Secret - leave blank normally.\nclient_secret&gt; \nRemote config\nUse auto config?\n * Say Y if not sure\n * Say N if you are working on a remote or headless machine or Y didn't work\ny) Yes\nn) No\ny\/n&gt; y\n<\/pre>\n<p>client_id\u3068client_secret\u306f\u4f55\u3082\u3044\u308c\u305a\u306bEnter<br \/>\n\u305d\u3057\u3066\u300cy\u300d\u3092\u62bc\u3059\u3068\u30d6\u30e9\u30a6\u30b6\u304c\u958b\u3044\u3066Google\u8a8d\u8a3c\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u306e\u3067\u3001rclone\u3092\u300c\u8a31\u53ef\u300d\u3059\u308b\u3092\u9078\u3076<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nWaiting for code...\nGot code\n--------------------\n&#x5B;Google]\nclient_id = \nclient_secret = \ntoken = {&quot;access_token&quot;:&quot;...&quot;,&quot;token_type&quot;:&quot;Bearer&quot;,&quot;refresh_token&quot;:&quot;...&quot;,&quot;expiry&quot;:&quot;2019-06-26T11:52:02.661189132+09:00&quot;}\n--------------------\ny) Yes this is OK\ne) Edit this remote\nd) Delete this remote\ny\/e\/d&gt; y\n<\/pre>\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u306b\u623b\u308a\u3001\u300cy\u300d<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nCurrent remotes:\n\nName                 Type\n====                 ====\nGoogle               drive\n\ne) Edit existing remote\nn) New remote\nd) Delete remote\nr) Rename remote\nc) Copy remote\ns) Set configuration password\nq) Quit config\ne\/n\/d\/r\/c\/s\/q&gt; q\n<\/pre>\n<p>\u8a2d\u5b9a\u5b8c\u4e86\u3002<br \/>\n\u300cq\u300d\u3067\u7d42\u4e86<\/p>\n<p>\u305d\u3057\u305f\u3089\u30ed\u30fc\u30ab\u30eb\u306b\u30d5\u30a9\u30eb\u30c0\u4f5c\u3063\u3066\u3001\u30ea\u30e2\u30fc\u30c8\u3068\u540c\u671f<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ mkdir googledrive\n$ cd googledrive\n$ rclone sync Google: .\n<\/pre>\n<p>\u3057\u3070\u3089\u304f\u5f85\u3064\u3068\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u30ed\u30fc\u30ab\u30eb\u3078\u306e\u540c\u671f\u304c\u5b8c\u4e86\u3059\u308b\u3002<\/p>\n<p>\u9006\u306f\u3053\u3046\u3060\u304c\u3001\u30ed\u30fc\u30ab\u30eb\u306b\u306a\u3044\u30ea\u30e2\u30fc\u30c8\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u6d88\u3055\u308c\u3061\u3083\u3046\u306e\u3067\u3001-n \u30aa\u30d7\u30b7\u30e7\u30f3\u3064\u3051\u3066\u6ce8\u610f\u3057\u306a\u304c\u3089\u540c\u671f\u3068\u3044\u3046\u904b\u7528\u3067\u30ab\u30d0\u30fc\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ cd googledrive\n$ rclone sync -n . Google:\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>rclone\u3067Google\u30c9\u30e9\u30a4\u30d6\u3068\u30ed\u30fc\u30ab\u30eb\u3092\u540c\u671f\u3057\u305f\u306e\u3067\u30e1\u30e2\u3002 apt\u3067rclone\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b $ sudo apt install rclone \u305d\u308c\u304b\u3089rclone config\u3067\u521d\u671f\u8a2d\u5b9a\u3002 $ rclon [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,8],"tags":[],"class_list":["post-823","post","type-post","status-publish","format-standard","hentry","category-google","category-linux"],"_links":{"self":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts\/823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/comments?post=823"}],"version-history":[{"count":0,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts\/823\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/media?parent=823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/categories?post=823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/tags?post=823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}