惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
Microsoft Azure Blog
Microsoft Azure Blog
云风的 BLOG
云风的 BLOG
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LangChain Blog
P
Privacy & Cybersecurity Law Blog
Hugging Face - Blog
Hugging Face - Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
大猫的无限游戏
大猫的无限游戏
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
A
Arctic Wolf
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threatpost
The GitHub Blog
The GitHub Blog
P
Privacy International News Feed
WordPress大学
WordPress大学
U
Unit 42
S
Securelist
T
The Exploit Database - CXSecurity.com
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
Latest news
Latest news
Hacker News: Ask HN
Hacker News: Ask HN
小众软件
小众软件
Know Your Adversary
Know Your Adversary
The Cloudflare Blog
V
Vulnerabilities – Threatpost
The Hacker News
The Hacker News
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
Security Latest
Security Latest
Google DeepMind News
Google DeepMind News
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Simon Willison's Weblog
Simon Willison's Weblog
博客园 - Franky
Y
Y Combinator Blog
博客园 - 叶小钗
Security Archives - TechRepublic
Security Archives - TechRepublic
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
S
Secure Thoughts
T
Threat Research - Cisco Blogs
aimingoo的专栏
aimingoo的专栏
S
SegmentFault 最新的问题
Microsoft Security Blog
Microsoft Security Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 司徒正美
M
MIT News - Artificial intelligence

Backups done right! on restic

restic · Restic 0.19.0 Released restic · Restic 0.18.1 Released restic · REST-server 0.14.0 released restic · Restic 0.18.0 Released restic · Restic 0.17.3 Released restic · Restic 0.17.2 Released restic · Restic 0.17.1 Released restic · Restic 0.17.0 Released restic · REST-server 0.13.0 released restic · Restic 0.16.5 Released restic · Restic 0.16.4 Released restic · Restic 0.16.3 Released restic · Restic 0.16.2 Released restic · Restic 0.16.1 Released restic · Restic 0.16.0 Released restic · REST-server 0.12.1 released restic · REST-server 0.12.0 released restic · Restic 0.15.2 released restic · Restic 0.15.1 Released restic · Restic 0.15.0 Released restic · Restic 0.14.0 Released restic · Restic 0.13.1 Released restic · Restic 0.13.0 Released restic · Rest Server 0.11.0 released restic · Restic 0.12.1 released restic · Restic 0.12.0 released restic · Restic 0.11.0 released restic · restic 0.10.0 released restic · Rest Server 0.10.0 Released restic · restic 0.9.6 released restic · restic 0.9.5 released restic · restic 0.9.4 released restic · New Year, New Infrastructure! restic · restic 0.9.3 released restic · Configuring GitHub Issue Templates restic · Enabling the Go Build Cache on Travis/AppVeyor restic · restic 0.9.2 released restic · restic 0.9.1 released restic · restic 0.9.0 released restic · The restic project turns four! restic · restic 0.8.3 released restic · restic 0.8.2 released restic · moving to restic.net restic · restic 0.8.1 released restic · restic 0.8.0 released restic · Upcoming changes for the S3 backend restic · restic 0.7.3 released restic · restic 0.7.2 released restic · Meeting at FrOSCon 2017 restic · Discourse Forum restic · Please upgrade to restic 0.7.1! restic · restic 0.7.1 released restic · Meeting at FrOSCon 2017 restic · restic 0.7.0 released restic · restic on GoTime #48 restic · restic 0.6.0 released restic · restic 0.6.1 released restic · restic 0.6.0-rc.1 released restic · restic 0.5.0 released restic · restic 0.4.0 released restic · The Go Devroom at FOSDEM 2017 restic · restic 0.3.3 released, Debian package restic · restic 0.3.2 released restic · restic 0.3.1 released restic · restic 0.3.0 released restic · Removing Snapshots restic · restic 0.2.0 released restic · Documentation and Manual restic · OpenChaos at CCC Cologne: restic restic · Verifying Code Archive Integrity restic · Foundation - Introducing Content Defined Chunking (CDC) A Solution to the Backup Inconvenience restic · Introduction to the restic Blog
restic · Using rclone as a restic Backend
2018-04-01 · via Backups done right! on restic

01 Apr 2018

Originally, restic started with just two backends: local and sftp. Over time, many new backends were added so that restic is now able to store a repository on a variety of different cloud-based services. However, it became clear that each new backend we add for a new cloud service works slightly different and requires almost constant maintenance.

A while ago, Alex was contacted by Nick, who found restic by listening to the episode #48 of the GoTime podcast. He’s the primary author of rclone, a program which is “rsync for cloud storage”. At the moment, it supports almost 20 different backends/services! They quickly agreed that it would be awesome if restic could just use rclone as a backend, thereby supporting all the backends that rclone can talk to!

Over the last couple of weeks, we have added support for rclone in restic. First, rclone learned how to serve restic’s the REST protocol (rclone PR #2116). It is now possible (rclone >= 1.40) to start rclone in server mode like this:

$ rclone serve restic --addr localhost:8889 --user foo --pass s3kr1t remote:bucket/path

Now, you can point restic (version 0.8.2 or later) to the REST server provided on the TCP port 8889 like this:

$ restic --repository rest:http://foo:s3kr1t@localhost:8889 init
[...]
$ restic --repository rest:http://foo:s3kr1t@localhost:8889 backup $HOME

While this is already awesome, it requires starting and stopping rclone manually. In addition, the HTTP server on the TCP port 8889 can be contacted by all processes running on the local machine. On most systems, it is allow to list the command-lines for all running programs, so users on the same machine can find out the username and password needed to contact the REST server. This is not bad, but we can do better.

The HTTP2 protocol allows “stream muxing”, which means serving several independent requests/streams over the same TCP connection. Most browsers only implement HTTP2 over TLS, so usually TLS is strictly required to be able to use HTTP2. But in general, HTTP2 can also be spoken over a single TCP connection, or another bi-directional channel.

It turned out that it is also possible to run an HTTP2 connection over stdin/stdout of a newly started process. We’ve implemented this in restic and rclone. Internally, restic runs rclone serve restic --stdio, and it will serve HTTP requests via HTTP2 on stdin/stdout.

This is great because it does not need any network connections, all data is only available to the user running the restic and rclone processes (except for the super user root). There’s also no need to coordinate local TCP ports with other users on the system, and restic can easily start and stop the rclone process. It is even possible to run multiple instances of restic/rclone in parallel without having to configure any TCP ports.

We’ve added the rclone backend in PR #1657 to restic which automates starting and stopping rclone and makes it really easy to use. Suppose you’ve configured a remote with rclone called b2prod, which can then be used to access data stored at BackBlaze B2, and you’ve created a bucket called yggdrasil. You should then be able to list the files in the bucket with the following command:

$ rclone ls b2prod:yggdrasil

Once this works, you can then use restic to initialize a new repository in the path /prod-serverA in the bucket yggdrasil like this:

$ restic --repo rclone:b2prod:yggdrasil/prod-serverA init
created restic repository 7905a088a0 at rclone:b2prod:yggdrasil/prod-serverA
[...]

Then you can check with rclone again and find new files in the bucket:

$ rclone ls b2prod:yggdrasil
    155 prod-serverA/config
    448 prod-serverA/keys/598a405c64c1f878a7eeb6a4691747defdc4d9d4caaa01ae2c3caa02878d3d74

You can find a beta version of restic compiled from the master branch here.

We’re very keen on getting feedback on this new backend! For experience reports, please just comment on the forum thread for this blog post (see below). If you think you’ve found a bug, please create a new issue on GitHub. Thanks!