Last active
August 15, 2017 11:01
-
-
Save akisatok/8741756e8196f85084c11ee592b60aab to your computer and use it in GitHub Desktop.
Amazon Drive をコマンドラインから操作する rclone の設定と利用方法 ref: http://qiita.com/_akisato/items/f4b36e86fcf7ae665b4d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir -p rclone | |
$ curl -O https://downloads.rclone.org/rclone-current-osx-amd64.zip | |
$ unzip -a rclone-current-osx-amd64.zip | |
$ cd rclone-*-osx-amd64 | |
(* にはバージョンが入る.2017年7月末現在ではv1.37のはず.) | |
# sudo mv rclone /usr/local/bin/ | |
# cd .. | |
# rm -rf rclone-*-osx-amd64 rclone-current-osx-amd64.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rclone config | |
No remotes found - make a new one | |
n) New remote | |
s) Set configuration password | |
q) Quit config | |
n/s/q> n | |
name> acd | |
Type of storage to configure. | |
Choose a number from below, or type in your own value | |
1 / Amazon Drive | |
\ "amazon cloud drive" | |
2 / Amazon S3 (also Dreamhost, Ceph, Minio) | |
\ "s3" | |
3 / Backblaze B2 | |
\ "b2" | |
4 / Dropbox | |
\ "dropbox" | |
5 / Encrypt/Decrypt a remote | |
\ "crypt" | |
6 / FTP Connection | |
\ "ftp" | |
7 / Google Cloud Storage (this is not Google Drive) | |
\ "google cloud storage" | |
8 / Google Drive | |
\ "drive" | |
9 / Hubic | |
\ "hubic" | |
10 / Local Disk | |
\ "local" | |
11 / Microsoft OneDrive | |
\ "onedrive" | |
12 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH) | |
\ "swift" | |
13 / SSH/SFTP Connection | |
\ "sftp" | |
14 / Yandex Disk | |
\ "yandex" | |
Storage> 1 | |
Amazon Application Client Id - required. | |
client_id> rclone | |
Amazon Application Client Secret - required. | |
client_secret> acd | |
Auth server URL - leave blank to use Amazon's. | |
auth_url> https://quixotic-module-170120.appspot.com/auth | |
Token server url - leave blank to use Amazon's. | |
token_url> https://quixotic-module-170120.appspot.com/token | |
Remote config | |
Make sure your Redirect URL is set to "http://127.0.0.1:53682/" in your custom config. | |
Use auto config? | |
* Say Y if not sure | |
* 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 | |
Log in and authorize rclone for access | |
Waiting for code... | |
Got code | |
-------------------- | |
[acd] | |
client_id = rclone | |
client_secret = acd | |
auth_url = https://quixotic-module-170120.appspot.com/auth | |
token_url = https://quixotic-module-170120.appspot.com/token | |
token = XXXX | |
-------------------- | |
y) Yes this is OK | |
e) Edit this remote | |
d) Delete this remote | |
y/e/d> y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rclone lsd acd: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rclone lsl acd: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rclone mkdir /Users/akisato/rclone-test | |
(ローカル側でのディレクトリ作成) | |
# rclone mkdir acd:rclone-test | |
(リモート側でのディレクトリ作成) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rclone copy /Users/akisato/rclone-test/test.txt acd:rclone-test/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rclone copy acd:rclone-test/test.txt /Users/akisato/rclone-test/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find /Users/akisato/rclone-test -name "*.txt" | xargs -n1 -L1 -I{} rclone copy {} acd:rclone-test/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rclone sync /Users/akisato/rclone-test acd: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment