translating

This commit is contained in:
geekpi 2020-09-24 08:40:29 +08:00
parent f99c847277
commit f3befb7918
2 changed files with 124 additions and 125 deletions

View File

@ -1,125 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What's new with rdiff-backup?)
[#]: via: (https://opensource.com/article/20/9/rdiff-backup-linux)
[#]: author: (Patrik Dufresne https://opensource.com/users/patrik-dufresne)
What's new with rdiff-backup?
======
The longstanding Linux backup solution's migration to Python 3 opens
opportunity to add many new features.
![Hand putting a Linux file folder into a drawer][1]
In March 2020, [rdiff-backup][2] advanced to version 2, 11 years after the last major release. The deprecation of Python 2 at the beginning of 2020 was the impetus for this update, but it gave the development team the opportunity to incorporate other features and benefits.
For about two decades, rdiff-backup has helped Linux users maintain full backups of their data locally or remotely without needlessly draining resources. This is because the open source solution does reverse incremental backups—backing up only the files that changed from the previous backup.
The revamp (or, as some are saying, rebirth) came thanks to the efforts of a new, self-organized development team (led by Eric Zolf and Patrik Dufresne from [IKUS Software][3] and Otto Kekäläinen from [Seravo][4]) that put heads and hands together for the benefit of all rdiff-backup users.
### New features in rdiff-backup
Along with the migration to Python 3, spearheaded by Eric, the project was migrated to a new, enterprise-free [repository][5] to welcome contributions. The team also incorporated all of the patches submitted over the years, including sparse file support and a fix for hard links.
#### Automation with Travis CI
Another huge improvement is the addition of a continuous integration/continuous delivery (CI/CD) pipeline using open source [Travis CI][6]. This permits rdiff-backup testing in various environments, which ensures that changes do not affect the solution's stability. The CI/CD pipeline includes integration of builds and binary distribution for all major platforms.
#### Easy installation with yum and apt
The new rdiff-backup solution runs on all major Linux distributions, including Fedora, Red Hat, Elementary, Debian, and many more. Frank and Otto worked arduously to provide open repositories to facilitate access and installation. You can install rdiff-backup using your package manager or follow the [step-by-step instructions][7] on the GitHub project page.
#### A new home
The team migrated the website from Savannah to GitHub Pages and is revamping the official [rdiff-backup.net][2] website to include new content and make the look and feel more on point.
### How to use rdiff-backup
If you're new to rdiff-backup, you might be surprised by how easy it is to use. A backup solution needs to be non-intimidating so that you feel comfortable with the backup and restoration processes.
#### Start a backup
To initiate a backup to a local drive, such as one attached by USB, enter the `rdiff-backup` command followed by the drive you want to back up and the target directory where you want to store the files.
For example, to back up to a local drive called `my_backup_drive`, enter:
```
`$ rdiff-backup /home/tux/ /run/media/tux/my_backup_drive/`
```
To back up your data to offsite storage, use the remote server's location followed by `::` to point to the backup drive's mount point:
```
`$ rdiff-backup /home/tux/ tux@example.com::/my_backup_drive/`
```
You may need to [set up SSH keys][8] to make this process effortless.
#### Restore files
The reason to make backups is that sometimes files go missing. To make recovery as simple as possible, you don't even need rdiff-backup to restore files (although using the `rdiff-backup` command provides some conveniences).
If you need to get a file from your backup drive, you can just copy it over from the backup drive to your local system using `cp` for a local drive or `scp` for a remote drive.
For a local drive, use:
```
`$ cp _run_media/tux/my_backup_drive/Documents/example.txt \ ~/Documents`
```
Or for a remote drive:
```
`$ scp tux@example.com::/my_backup_drive/Documents/example.txt \ ~/Documents`
```
However, using the `rdiff-backup` command provides other options, including the `--restore-as-of` option. This allows you to specify which version of your file you want to rescue.
For example, suppose you want to rescue a file as it appeared four days ago:
```
`$ rdiff-backup --restore-as-of 4D \ /run/media/tux/foo.txt ~/foo_4D.txt`
```
You can also use `rdiff-backup` to grab the latest version:
```
`$ rdiff-backup --restore-as-of now \ /run/media/tux/foo.txt ~/foo_4D.txt`
```
It's that easy. Also, rdiff-backup has many other options, e.g., you can exclude files from a list, back up from one remote to another remote, and more, which you can learn about in the [documentation][9].
### Back it up
Our development team hopes users will appreciate this revamped open source rdiff-backup solution, which is the culmination of our continuous efforts. We also appreciate our contributors, who truly demonstrate the power of open source.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/9/rdiff-backup-linux
作者:[Patrik Dufresne][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/patrik-dufresne
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC (Hand putting a Linux file folder into a drawer)
[2]: https://rdiff-backup.net/
[3]: https://www.ikus-soft.com/en/
[4]: https://seravo.fi/english
[5]: https://github.com/rdiff-backup/rdiff-backup
[6]: https://en.wikipedia.org/wiki/Travis_CI
[7]: https://github.com/rdiff-backup/rdiff-backup#installation
[8]: https://opensource.com/article/20/8/how-ssh
[9]: https://rdiff-backup.net/docs/examples.html

View File

@ -0,0 +1,124 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What's new with rdiff-backup?)
[#]: via: (https://opensource.com/article/20/9/rdiff-backup-linux)
[#]: author: (Patrik Dufresne https://opensource.com/users/patrik-dufresne)
rdiff-backup 有什么新功能?
======
长期的 Linux 备份方案向 Python 3 的迁移为添加许多新功能提供了机会。
![Hand putting a Linux file folder into a drawer][1]
2020 年 3 月,[rdiff-backup][2] 升级到了 2.0 版,这距离上一个主要版本已经过去了 11 年。2020 年初 Python 2 的废弃是这次更新的动力,但它为开发团队提供了整合其他功能和优势的机会。
大约二十年来rdiff-backup 帮助 Linux 用户在本地或远程维护他们的数据的完整备份,而无需无谓地消耗资源。这是因为这个开源解决方案可以进行反向增量备份,只备份从上一次备份中改变的文件。
改版(或说,重生)得益于一个新的、自组织的开发团队(由来自 [IKUS Software][3] 的 Eric Zolf 和 Patrik Dufresne 领导,以及来自 [Seravo][4]的 Otto Kekäläinen 领导)的努力,为了所有 rdiff-backup 用户的利益,他们齐心协力。
### rdiff-backup 的新功能
在 Eric 的带领下,随着向 Python 3 的迁移,项目被迁移到了一个新的、不受企业限制的[仓库][5],以欢迎贡献。团队还整合了多年来提交的所有补丁,包括稀疏文件支持和硬链接的修复。
#### 用 Travis CI 实现自动化
另一个巨大的改进是增加了一个使用开源 [Travis CI][6] 的持续集成/持续交付 CI/CD 管道。这允许在各种环境下测试 rdiff-backup从而确保变化不会影响方案的稳定性。CI/CD 管道包括集成所有主要平台的构建和二进制发布。
#### 使用 yum 和 apt 轻松安装
新的 rdiff-backup 解决方案可以运行在所有主流的 Linux 发行版上,包括 Fedora、Red Hat、Elementary、Debian 等。Frank 和 Otto 付出了艰辛的努力,提供了开放仓库以方便访问和安装。你可以使用你的软件包管理器安装 rdiff-backup或者按照 GitHub 项目页面上的[分步说明][7]进行安装。
#### 新的主页
团队将网站从 Savannah 迁移到了 GitHub Pages并对 [rdiff-backup.net][2] 官网进行了改版,加入了新的内容,让外观和感觉更加到位。
### 如何使用 rdiff-backup
如果你是 rdiff-backup 的新手,你可能会对它的易用性感到惊讶。一个备份方案需要让你对备份和恢复过程感到舒适,而不是吓人。
#### 开始备份
要开始备份到本地驱动器,例如通过 USB 连接的驱动器,输入 `rdiff-backup` 命令,然后输入要备份的驱动器和要存储文件的目标目录。
例如,要备份到名为 `my_backup_drive` 的本地驱动器,请输入:
```
`$ rdiff-backup /home/tux/ /run/media/tux/my_backup_drive/`
```
要将数据备份到异地存储,请使用远程服务器的位置,并在 `::` 后面指向备份驱动器的挂载点:
```
`$ rdiff-backup /home/tux/ tux@example.com::/my_backup_drive/`
```
你可能需要[设置 SSH 密钥][8]来使这个过程不费力。
#### 还原文件
做备份的原因是有时文件会丢失。为了使恢复尽可能简单,你甚至不需要 rdiff-backup 来恢复文件(虽然使用 `rdiff-backup` 命令提供了一些方便)。
如果你需要从备份驱动器中获取一个文件,你可以使用 `cp` 将其从备份驱动器复制到本地系统,或者对于远程驱动器使用 `scp` 命令。
对于本地驱动器,使用:
```
`$ cp _run_media/tux/my_backup_drive/Documents/example.txt \ ~/Documents`
```
或者用于远程驱动器:
```
`$ scp tux@example.com::/my_backup_drive/Documents/example.txt \ ~/Documents`
```
然而,使用 `rdiff-backup` 命令提供了其他选项,包括 `--restore-as-of`。这允许你指定你要恢复的文件的哪个版本。
例如,假设你想恢复一个文件在四天前的版本:
```
`$ rdiff-backup --restore-as-of 4D \ /run/media/tux/foo.txt ~/foo_4D.txt`
```
你也可以用 `rdiff-backup` 来获取最新版本:
```
`$ rdiff-backup --restore-as-of now \ /run/media/tux/foo.txt ~/foo_4D.txt`
```
就是这么简单。另外rdiff-backup 还有很多其他选项,例如,你可以从列表中排除文件,从一个远程备份到另一个远程等等,这些你可以在[文档][9]中了解。
### 总结
我们的开发团队希望用户能够喜欢这个改版后的开源 rdiff-backup 方案,这是我们不断努力的结晶。我们也感谢我们的贡献者,他们真正展示了开源的力量。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/9/rdiff-backup-linux
作者:[Patrik Dufresne][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/patrik-dufresne
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC (Hand putting a Linux file folder into a drawer)
[2]: https://rdiff-backup.net/
[3]: https://www.ikus-soft.com/en/
[4]: https://seravo.fi/english
[5]: https://github.com/rdiff-backup/rdiff-backup
[6]: https://en.wikipedia.org/wiki/Travis_CI
[7]: https://github.com/rdiff-backup/rdiff-backup#installation
[8]: https://opensource.com/article/20/8/how-ssh
[9]: https://rdiff-backup.net/docs/examples.html