Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TOC for best practices of file backup #49

Merged
merged 21 commits into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions source/best-practices/backup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
备份与还原
==========

**备份!备份!备份!**

尽管不经常发生,但电脑随时可能会坏掉或被盗,电脑硬盘也随时可能会出问题,
也可能不小心使用一个命令把几个月的工作误删了。所以,备份非常重要,不进行必要的备份
是十分危险的。

备份的目的
----------

- 仅备份重要文件
- 仅备份家目录
- 全盘备份

备份的介质
----------

- 硬盘备份
- 网盘备份

我们主要讨论硬盘备份。

Linux
------

rysnc
^^^^^^

至少每周将工作电脑中的文件备份到移动硬盘中。推荐使用 rsync 进行备份,其用法为::

rsync --delete -av /home/seisman/ /data1/seisman/

该命令作用是将 /home/seisman/ 目录完整同步到 /data1/seisman/ 目录下。

rsync 的特色在于增量备份。这意味着只有第一次备份的时候需要花比较多的时间,
以后再使用该命令进行备份时只会同步改动。加入你一周只修改了一个文件,那么同步的过程会在瞬间完成。

DejaDup
^^^^^^^

btrfs
^^^^^

macOS
-----

macOS 下最好用的备份工具当属 Time Machine。

Time Machine
^^^^^^^^^^^^^

Windows
-------

robocopy
^^^^^^^^

Backup
^^^^^^
3 changes: 2 additions & 1 deletion source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@
best-practices/index
best-practices/file-organization
best-practices/software-installation
best-practices/backup
best-practices/zsh


欢迎阅读由\ `地震“学”小组 <https://github.com/orgs/seismo-learn/people>`__\
撰写的《地震“学”科研入门教程》。
Expand Down