{"id":156,"date":"2022-10-18T22:47:51","date_gmt":"2022-10-19T02:47:51","guid":{"rendered":"https:\/\/www.mymaplelife.com\/blog\/?p=156"},"modified":"2024-03-29T14:02:08","modified_gmt":"2024-03-29T18:02:08","slug":"%e4%ba%91%e7%9b%98%e7%ae%a1%e7%90%86%e7%9a%84%e7%91%9e%e5%a3%ab%e5%86%9b%e5%88%80-rclone","status":"publish","type":"post","link":"https:\/\/www.mymaplelife.com\/blog\/2022\/10\/18\/%e4%ba%91%e7%9b%98%e7%ae%a1%e7%90%86%e7%9a%84%e7%91%9e%e5%a3%ab%e5%86%9b%e5%88%80-rclone\/","title":{"rendered":"\u4e91\u76d8\u7ba1\u7406\u7684\u745e\u58eb\u519b\u5200 &#8211; rclone"},"content":{"rendered":"\n<p><strong>rclone<\/strong> \u662f\u4e00\u6b3e\u795e\u5668\u7ea7\u522b\u7684\u4e91\u76d8\u7ba1\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u4e8e\u7ba1\u7406\u5404\u79cd\u6d88\u8d39\u548c\u5546\u4e1a\u7684\u4e91\u5b58\u50a8\u670d\u52a1\uff0c\u6bd4\u5982 AWS S3 \u548c Drive\uff0c\u8c37\u6b4cCloud Storage \u548c Drive\uff0c\u5fae\u8f6f OneDrive\uff0cDropbox\uff0c Box \u7b49\u7b49\u3002<\/p>\n\n\n\n<p>\u5b83\u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u80fd\u591f\u5728\u4e91\u76d8\u4e0a\u5b8c\u6210\u5f88\u591a Unix\/Linux \u547d\u4ee4\u7684\u7b49\u6548\u5de5\u4f5c\uff0c\u6bd4\u5982rsync\u3001cp\u3001mv\u3001mount\u3001ls\u3001ncdu\u3001tree\u3001rm \u548c cat\u3002\u5b83\u540c\u65f6\u652f\u6301 Linux\uff0cMacOS \u548c Windows\u3002<\/p>\n\n\n\n<p>\u6211\u6700\u8fd1\u5229\u7528 rclone \u548c Google \u7684 Drive\uff0c\u4e3a\u81ea\u5df1\u7684\u7f51\u7ad9\u505a\u4e86\u4e00\u4e2a\u7b80\u6613\u7248\u7684\u5f02\u5730\u5907\u4efd\u529f\u80fd\u3002\u4e3b\u8981\u601d\u8def\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u7533\u8bf7\u4e00\u4e2a\u514d\u8d39\u7684\u8c37\u6b4c\u8d26\u6237\uff0c\u83b7\u53d6 15 GB\u7684\u4e91\u76d8<\/li><li>\u5229\u7528 rclone \u7ed1\u5b9a\/mount google drive \u5230 Linux \u670d\u52a1\u5668\u4e0a<\/li><li>\u4f7f\u7528 cron \u548c Linux \u5de5\u5177\u4ee5\u6587\u4ef6\u62f7\u8d1d\u7684\u5f62\u5f0f\u5b9e\u73b0\u5f02\u5730\u5907\u4efd<\/li><\/ol>\n\n\n\n<p>\u8fd9\u91cc\u5206\u4eab\u4e00\u4e0b rclone \u7ed1\u5b9a\/mount Google Drive \u7684\u6574\u4e2a\u5b89\u88c5\u8fc7\u7a0b<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u5b89\u88c5<ul><li>\u5b98\u65b9\u5b89\u88c5\u6559\u7a0b\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/rclone.org\/install\/\" target=\"_blank\">https:\/\/rclone.org\/install\/<\/a><\/li><li>\u6bd4\u5982\u4ee5 root \u8eab\u4efd\u8fdb\u884c\u5b89\u88c5<\/li><li>\u547d\u4ee4\uff1a<em>curl https:\/\/rclone.org\/install.sh | sudo bash<\/em><\/li><\/ul><\/li><li>\u8bbe\u7f6e Google Drive<ul><li>\u5b98\u65b9\u5b89\u88c5\u6559\u7a0b\uff1a<a href=\"https:\/\/rclone.org\/drive\/#making-your-own-client-id\">https:\/\/rclone.org\/drive\/#making-your-own-client-id<\/a><\/li><\/ul><ul><li>\u6ce8\u610f\u4e8b\u9879<ul><li>\u8fd0\u884c rclone config \u547d\u4ee4<\/li><li>\u4f7f\u7528 auto-config \u5b8c\u6210\u914d\u7f6e<\/li><li>\u914d\u7f6e\u7684\u552f\u4e00\u96be\u70b9\uff1a\u5728\u81ea\u52a8\u6a21\u5f0f\u4e0b\uff0crclone \u4f1a\u8d77\u7528\u4e00\u4e2a\u4e34\u65f6\u7684 web \u670d\u52a1\u5668\uff0c\u8bbf\u95ee URL \u662f <a href=\"http:\/\/127.0.0.1:53682\/\">http:\/\/127.0.0.1:53682\/<\/a>\uff0c\u4f1a\u88ab\u7528\u4e8e\u901a\u8fc7\u7f51\u9875\u5b9e\u73b0\u5bf9 Google \u670d\u52a1\u7684\u767b\u5f55\u8ba4\u8bc1\u548c\u6388\u6743\u3002\u5f53\u6211\u914d\u7f6e\u539f\u521b\u7684\u670d\u52a1\u5668\u662f\uff0c\u6211\u9700\u8981\u901a\u8fc7 SSH Tunneling \u7684\u65b9\u5f0f\uff0c\u628a\u7aef\u53e3\u8f6c\u53d1\uff08port forward\uff09\u5230\u672c\u5730\u7684\u7b14\u8bb0\u672c\u6216\u53f0\u5f0f\u673a\u4e0a\u3002\u6211\u4f7f\u7528 putty \u505a\u7aef\u53e3\u8f6c\u53d1<\/li><li>Paths \u683c\u5f0f\u4e3a drive:path<\/li><li>Drive paths \u53ef\u4ee5\u4e3a\u591a\u5c42\u76ee\u5f55\uff0c\u6bd4\u5982\uff1adrive:directory\/subdirectory.<\/li><\/ul><\/li><\/ul><ul><li>\u8fd0\u884c rclone \u547d\u4ee4\u8fdb\u884c\u9a8c\u8bc1<\/li><\/ul><\/li><li>\u7ed1\u5b9a\/mount<ul><li>rclone \u8fd0\u884c\u7ed1\u5b9a\u529f\u80fd\u9700\u8981 fuse \u8f6f\u4ef6\u5305\uff0c\u5b89\u88c5\u8be5\u5305<\/li><li>\u8fd0\u884c\u7ed1\u5b9a\u547d\u4ee4<\/li><li>\u89e3\u7ed1\u547d\u4ee4<\/li><\/ul><\/li><\/ol>\n\n\n\n<p>\u6211\u628a\u6574\u4e2a\u8fc7\u7a0b\u7684\u547d\u4ee4\u5217\u5728\u4e0b\u9762<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code>#- \u5b89\u88c5\n# curl https:\/\/rclone.org\/install.sh | sudo bash\n#- \u8fd0\u884c\u914d\u7f6e\u547d\u4ee4\n# rclone config\n#- \u9a8c\u8bc1\n# rclone listremotes\ng-drive:\n# rclone lsd g-drive:\n          -1 2022-10-10 00:41:02        -1 2022-09-25\n          -1 2022-10-09 15:51:35        -1 2022-10-09\n          -1 2022-10-10 23:08:20        -1 backups\n# rclone lsd g-drive:\/2022-10-09\/\n#- \u5b89\u88c5 fuse\n# yum install fuse\n#- \u521b\u5efa\u7ed1\u5b9a\u76ee\u5f55\nmkdir -p \/backup\/gdrive\n#- \u7ed1\u5b9a\n# rclone mount g-drive:\/backups\/ \/backup\/gdrive --daemon --allow-non-empty\n#- \u89e3\u7ed1\n# umount \/backup\/gdrive\n\n<\/code><\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>rclone \u662f\u4e00\u6b3e\u795e\u5668\u7ea7\u522b\u7684\u4e91\u76d8\u7ba1\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u4e8e\u7ba1\u7406\u5404\u79cd\u6d88\u8d39\u548c\u5546\u4e1a\u7684\u4e91\u5b58\u50a8\u670d\u52a1\uff0c\u6bd4\u5982 AWS S3 \u548c Drive\uff0c\u8c37\u6b4cCloud Storage \u548c Drive\uff0c\u5fae\u8f6f OneDrive\uff0cDropbox\uff0c Box \u7b49\u7b49\u3002<\/p>\n","protected":false},"author":2,"featured_media":162,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-156","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/www.mymaplelife.com\/blog\/wp-json\/wp\/v2\/posts\/156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mymaplelife.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mymaplelife.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mymaplelife.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mymaplelife.com\/blog\/wp-json\/wp\/v2\/comments?post=156"}],"version-history":[{"count":2,"href":"https:\/\/www.mymaplelife.com\/blog\/wp-json\/wp\/v2\/posts\/156\/revisions"}],"predecessor-version":[{"id":161,"href":"https:\/\/www.mymaplelife.com\/blog\/wp-json\/wp\/v2\/posts\/156\/revisions\/161"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mymaplelife.com\/blog\/wp-json\/wp\/v2\/media\/162"}],"wp:attachment":[{"href":"https:\/\/www.mymaplelife.com\/blog\/wp-json\/wp\/v2\/media?parent=156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mymaplelife.com\/blog\/wp-json\/wp\/v2\/categories?post=156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mymaplelife.com\/blog\/wp-json\/wp\/v2\/tags?post=156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}