自动备份远程托管服务器的最佳实践 [英] Best practice to automatically backup remotely hosted server

查看:115
本文介绍了自动备份远程托管服务器的最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置一个用于团队记录笔记的服务器,我想知道什么是自动备份其数据的最佳方法,也就是我的笔记。

I am trying to setup a server for team note taking, and I am wondering what is the best way to backup its data, A.K.A my notes, automatically.

当前,我计划在docker映像中运行服务器。

docker映像将由托管服务(例如Google)托管。

我找到了适合我需要的免费托管服务,但不允许将卷装载到Docker映像。

因此,我认为备份数据的唯一方法是将它们转移到其他云服务。

但是,这要求我必须在docker映像中存储某种敏感数据以进行身份​​验证,显然这并不酷。

Currently I plan to run the server in a docker image.
The docker image will be hosted by a hosting service (such as Google).
I found a free hosting service that fits my need, but it does not allow mounting volumes to a docker image.
Therefore, I think the only way for me to backup my data is to transfer them to some other cloud services.
However, this requires that I have to store some sort of sensitive data for authentication in my docker image, apparently this is not cool.

所以:


  1. 是否可以从docker映像到云服务,而又不会冒密码/私钥泄露的风险?

  1. Is it possible to transfer data from a docker image to a cloud service without taking the risk of leaking password/private key?

还有其他方法可以备份我的数据吗?

我不需要使用docker,因为我需要的实际上是Node .js。

但是服务器必须托管在某些远程计算机上,因为我没有能力/时间/金钱来自己托管计算机...

Is there any other way to backup my data?
I don't have to use docker as all I need is actually Node.js.
But the server must be hosted on some remote machines because I don't have the ability/time/money to host a machine on my own...


推荐答案

我使用 borg 备份以备份我们的服务器(包括docker卷)...由于故障和愚蠢,它已经保存了很多天。

I use borg backup to backup our servers (including docker volumes) ... and it's saved the day many times due to failure and stupidity.

它通过SSH传输,因此对通讯进行了加密。它使用的存储库也已在磁盘上加密,从而使所有数据安全。它会进行重复数据删除,快照,修剪,压缩...功能列表很大。

It transfers over SSH so comms are encrypted. The repositories it uses are also encrypted on disk so that makes all your data safe. It de-duplicates, snapshots, prunes, compresses ... the feature list is quite large.

第一次备份后,后续备份要快得多,因为它只提交

After the first backup, subsequent backups are much faster because it only submits the changes since the previous backup.

您还可以将快照作为文件系统挂载,这样就可以查找删除的单个文件或恢复整个文件。挂载也可以远程完成。

You can also mount the snapshots as filesystems so you can hunt down the single file you deleted or just restore the whole lot. The mounts can also be done remotely.

我已经将我们的文件配置为备份/ home,/ etc和/ var / lib / docker / volumes目录(以及其他目录)

I've configured ours to backup /home, /etc and the /var/lib/docker/volumes directories (among others).

我们租用了一些廉价的存储VPS,并每晚将数据发送给他们。他们知道他们在不同的地理位置,拥有不同的托管服务提供商,因为我们很偏执。

We rent a few cheap storage VPSs and send the data up to them nightly. They're in different geographic locations with different hosting providers, you know, because we're paranoid.

这篇关于自动备份远程托管服务器的最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆