Skip to content

搞英语 → 看世界

翻译英文优质信息和名人推特

Menu
  • 首页
  • 作者列表
  • 独立博客
  • 专业媒体
  • 名人推特
  • 邮件列表
  • 关于本站
Menu

使用 GitHub Actions 将 OneDrive 备份到 S3

Posted on 2024-01-17

我使用开源软件的理想正在一点点褪色,我已经使用 OneDrive 来同步我的文件已经有一段时间了。它很便宜,至少工作可靠。

直到最近,我还使用我的家庭服务器在本地对所有文件进行日常备份。使用简单的 cron 作业和带有 Rclone 的简单脚本。

最佳方案是拥有三个副本,但虽然只有两个副本,但我认为数据中心的异地备份可能比我家更安全。

因此,我创建了一个简单的 GitHub Action 设置,每天晚上运行从 OneDrive 到Scaleway Glacier Cold Storage 的备份。当Scaleway Serverless Jobs结束测试版并且有一些安排它们的选项时,我可能会切换到它们。

但到目前为止,这是我的 GitHub Actions 工作流程:

 name : Sync OneDrive to S3  on :   schedule :     - cron : "0 0 * * *"   workflow_dispatch :  jobs :   sync :     runs-on : ubuntu-latest      steps :       - name : Sync OneDrive to S3         uses : docker://docker.io/rclone/rclone:1.65         with :           args : "sync --fast-list --checksum --update --use-server-modtime --metadata --inplace --delete-during --multi-thread-streams 10 onedrive:$ s3:$"         env :           RCLONE_CONFIG_ONEDRIVE_TYPE : onedrive           RCLONE_CONFIG_ONEDRIVE_TOKEN : $           RCLONE_CONFIG_ONEDRIVE_DRIVE_ID : $           RCLONE_CONFIG_ONEDRIVE_DRIVE_TYPE : $           RCLONE_CONFIG_ONEDRIVE_DELTA : true           RCLONE_CONFIG_S3_TYPE : s3           RCLONE_CONFIG_S3_ENDPOINT : $           RCLONE_CONFIG_S3_PROVIDER : $           RCLONE_CONFIG_S3_REGION : $           RCLONE_CONFIG_S3_BUCKET_ACL : $           RCLONE_CONFIG_S3_ACCESS_KEY_ID : $           RCLONE_CONFIG_S3_SECRET_ACCESS_KEY : $ 

关于秘密的一些注释:

  • TARGET_DIRECTORY是 S3 存储桶的名称,
  • SOURCE_DIRECTORY通常为空,
  • 其他值来自 Rclone 配置文件 ( rclone config )。

PS:写完这篇文章后,我注意到当我还在使用 Hetzner 的 Nextcloud 时,我也做了类似的事情。

互动与评论

原文: https://jlelse.blog/dev/backup-onedrive-s3-actions

本站文章系自动翻译,站长会周期检查,如果有不当内容,请点此留言,非常感谢。
  • Abhinav
  • Abigail Pain
  • Adam Fortuna
  • Alberto Gallego
  • Alex Wlchan
  • Answer.AI
  • Arne Bahlo
  • Ben Carlson
  • Ben Kuhn
  • Bert Hubert
  • Bits about Money
  • Brian Krebs
  • ByteByteGo
  • Chip Huyen
  • Chips and Cheese
  • Christopher Butler
  • Colin Percival
  • Cool Infographics
  • Dan Sinker
  • David Walsh
  • Dmitry Dolzhenko
  • Dustin Curtis
  • Elad Gil
  • Ellie Huxtable
  • Ethan Marcotte
  • Exponential View
  • FAIL Blog
  • Founder Weekly
  • Geoffrey Huntley
  • Geoffrey Litt
  • Greg Mankiw
  • Henrique Dias
  • Hypercritical
  • IEEE Spectrum
  • Investment Talk
  • Jaz
  • Jeff Geerling
  • Jonas Hietala
  • Josh Comeau
  • Lenny Rachitsky
  • Liz Danzico
  • Lou Plummer
  • Luke Wroblewski
  • Matt Baer
  • Matt Stoller
  • Matthias Endler
  • Mert Bulan
  • Mostly metrics
  • News Letter
  • NextDraft
  • Non_Interactive
  • Not Boring
  • One Useful Thing
  • Phil Eaton
  • Product Market Fit
  • Readwise
  • ReedyBear
  • Robert Heaton
  • Ruben Schade
  • Sage Economics
  • Sam Altman
  • Sam Rose
  • selfh.st
  • Shtetl-Optimized
  • Simon schreibt
  • Slashdot
  • Small Good Things
  • Taylor Troesh
  • Telegram Blog
  • The Macro Compass
  • The Pomp Letter
  • thesephist
  • Thinking Deep & Wide
  • Tim Kellogg
  • Understanding AI
  • 英文媒体
  • 英文推特
  • 英文独立博客
©2025 搞英语 → 看世界 | Design: Newspaperly WordPress Theme