Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PythonではなくRcloneで アップロードしてみた
Search
YouYou
December 05, 2021
Programming
6.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PythonではなくRcloneで アップロードしてみた
詳細ブログ↓
https://zenn.dev/yuta28/articles/rclone-upload-gdrive
YouYou
December 05, 2021
More Decks by YouYou
See All by YouYou
AWSマネコンに複数のアカウントで入れるようになりました
yuhta28
2
310
今インフラ技術をイチから学び直すなら
yuhta28
1
310
AWSに詳しくない人でも始められるコスト最適化ガイド
yuhta28
3
690
Datadog外形監視基盤をEC2から ECSへ移行してみた
yuhta28
0
1.9k
アウトプット頑張ったら企業からLT登壇の依頼がきた話
yuhta28
1
1.9k
小さなことから始めるAWSコスト最適入門
yuhta28
1
1.5k
Datadogのコストも監視しよう
yuhta28
1
1.1k
Rcloneを使った定期的なストレージ同期
yuhta28
0
880
Pulumiを触ってみよう
yuhta28
1
2.8k
Other Decks in Programming
See All in Programming
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
130
setup-vp GitLab対応の裏側
naokihaba
0
110
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
220
App Intentsのビルドプロセスを支える技術
kntkymt
0
390
すこし踏み込む CancellationToken
htkym
1
480
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
120
Security issues being discussed on Web Platforms
petamoriken
0
970
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
4.7k
Webの地図
yosuke_furukawa
PRO
6
4.6k
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
370
FreeBSDでZabbixを動かす
kenkino
0
300
アクセシビリティから考える情報設計
high_g_engineer
0
380
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
290
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Designing Powerful Visuals for Engaging Learning
tmiket
1
570
The Limits of Empathy - UXLibs8
cassininazir
1
680
Six Lessons from altMBA
skipperchong
29
4.5k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
200
It's Worth the Effort
3n
188
29k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
670
Transcript
PythonではなくRcloneで アップロードしてみた
Name:ユータ Occupation:SRE Twitter:@Y0u281 (オーでなくゼロです) ブログ:https://zenn.dev/yuta28 自己紹介 Twitter
目次 • 背景 • Pythonで実装 • Rcloneで実装 • おまけ •
まとめ
背景 ファイルコピーをしたい
背景 • Pythonを使えば簡単にできそう • PyDriveというものが有名らしい ◦ →既に開発終了していて非推奨らしい • GoogleドライブにはAPIがあってそれを使えばできそう ◦
Upload file data | Google Drive API ◦ サンプルソースも用意されていてイケる !
Pythonで実装 1. GCPでAPIを有効化 2. OAuthの認証情報を作成 3. クライアントトークンをEC2内に格納 4. Python Quickstart
| Google Drive API 5. Upload file data | Google Drive API
Pythonで実装
Pythonで実装 googleapiclient.errors.HttpError: <HttpError 404 when requesting https://www.googleapis.com/upload/drive/v3/files?fields=id&alt=json&uploadType=resumable returned "File not
found: /&~ev-%,s+2eqeH|jwG3!#-a%6#6LZyhdh". #IDはサンプル Details: "[{'domain': 'global', 'reason': 'notFound', 'message': 'File not found: 1mE_qImJ7ASarUCE4XUkv9sVER4-sVJKM.', 'locationType': 'parameter', 'location': 'fileId'}]">
Rcloneで実装 • Rclone.org • Go製のOSS • クラウドストレージにファイルをup/downloadできる ◦ 40個以上に対応!! ◦
暗号化して転送することも可能 • クラウドストレージ先にmountも可 • (プレビューだが)WebGUIも提供
Rcloneで実装 rclone configでセットアップを実施 • 前述で取得したクライアントトークンの IDとシークレット情報を貼り付け https://rclone.org/drive/
Rcloneで実装 copyコマンドでソースファイルと接続先のクラウドストレージ名を指定 rclone copy source file remote:
Rcloneで実装
おまけ GUIダッシュボードもあります rclone rcd --rc-web-gui コマンドベースではないので 直感的に設定しやすい ? OSS活動も受付中らしい https://github.com/rclone/rclone
-webui-react
まとめ
まとめ プログラミングなにもわからない
ありがとうございました より詳しい内容は以下のブログで↓ PythonではなくRcloneでGoogle共有ドラ イブにファイルをアップロードしてみた