rsync运行时使用硬盘安全吗?

如果您是第一次开始使用rsync,并且有多个大型硬盘驱动器要备份,那么在这个漫长的过程中使用一个或多个硬盘驱动器是否安全?今天的超级用户问答帖子回答了一位忧心忡忡的读者的问题。...

rsync运行时使用硬盘安全吗?

如果您是第一次开始使用rsync,并且有多个大型硬盘驱动器要备份,那么在这个漫长的过程中使用一个或多个硬盘驱动器是否安全?今天的超级用户问答帖子回答了一位忧心忡忡的读者的问题。

今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的问答网站分组。

问题

超级用户读者都想知道在rsync运行时使用硬盘是否安全:

I plan to backup my collection of large hard drives using rsync and anticipate that it will take a few days. Is it safe to use the original hard drive (adding files) while rsync is working or it is better to leave the hard drives untouched until rsync is completely finished?

rsync运行时使用硬盘安全吗?

答案

超级用户贡献者Michael Kjorling为我们提供了答案:

As others have already pointed out, it is safe to read from the source disk or use the target disk outside of the target directory while rsync is running. It is also safe to read within the target directory, especially if the target directory is being populated exclusively by the rsync run.

What is not generally safe, however, is to write within the source directory while rsync is running. “Write” is anything that modifies the content of the source directory or any subdirectory thereof, so that includes file updates, deleti***, creation, etc.

Doing so will not actually break anything, but the change may or may not actually get picked up by rsync for copying to the target location. That depends on the type of change, whether rsync has scanned that particular directory yet, and whether rsync has copied the file or directory in question yet.

There is an easy way around that, however. Once rsync has finished, run it again with the same parameters (unless you have some funky deletion parameter; if you do, then be a bit more careful). Doing so will cause rsync to re-scan the source and transfer any differences that were not picked up during the original run.

The second run should transfer only differences that happened during the previous rsync run, and as such, will be completed much faster. Thus, you can feel free to use the computer normally during the first run, but should avoid making any changes as much as possible to the source during the second run. If you can, strongly c***ider remounting the source file system as read-only before starting the second rsync run (something like mount -o ro,remount /media/source should do).


有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。

图片来源:Linux截图(Flickr)

  • 发表于 2021-04-08 07:18
  • 阅读 ( 171 )
  • 分类:互联网

你可能感兴趣的文章

将数据存储在freenas盒上的10个原因

...它扔掉?为什么不给它注入新的活力呢。FreeNAS几乎可以运行任何东西。当然,你可能无法同时流4K内容到您的整个社区。但如果您想要一个简单、安全的文件服务器和/或备份服务器。 ...

  • 发布于 2021-03-14 03:40
  • 阅读 ( 319 )

linux上应该有5个安全工具

... Firejail使这一过程变得简单。在沙盒中运行程序只是一个额外的终端命令。如果不适合使用命令行,它还提供了一个简单的图形工具来管理它们。 ...

  • 发布于 2021-03-15 01:11
  • 阅读 ( 192 )

使用rsync备份数据(无需桌面)

... 在跳入深端并正确使用rsync之前,最好先进行一次试运行。这样做可以让您在备份数据之前准确地看到rsync将复制什么以及复制到哪里。您只需在命令中添加-n选项(no changes made的缩写)即可执行测试运行: ...

  • 发布于 2021-03-16 12:17
  • 阅读 ( 167 )

如何确保您的计算机可以运行Windows10

...您可能坚持使用Windows7或Windows8,但您的计算机很有可能运行Windows10。下面是如何检查你的电脑是否可以运行Windows以及下一步该怎么做。 ...

  • 发布于 2021-03-19 03:52
  • 阅读 ( 189 )

2018年最受欢迎的10款linux应用程序和发行版

... 你可以找到各种游戏发行版,运行服务器,甚至非常具体的可能运行在烤面包机。 ...

  • 发布于 2021-03-25 18:09
  • 阅读 ( 225 )

如何在windows10中修复速度较慢的外部硬盘

... 整理磁盘驱动器碎片 运行检查磁盘扫描 检查外壳或驱动器本身是否损坏 检查电缆,必要时更换 磁盘活动过多 检查你的驱动器和电脑...

  • 发布于 2021-03-25 23:19
  • 阅读 ( 319 )

使用rsync自动将文件备份到远程服务器

...作之前,请检查是否安装了rsync。在本地PC和web服务器上运行以下命令: ...

  • 发布于 2021-03-28 09:36
  • 阅读 ( 232 )

如何备份linux系统

...表示如果不使用rsync将发送的数据的大小。在rsync的后续运行中,它只传输文件差异。此数字将表示不必传输的数据。 加速:这是必须发送的数据量与总数据量之间的比率。如果rsync需要完整地复制所有文件(例如第一次运行时...

  • 发布于 2021-04-03 09:19
  • 阅读 ( 204 )

删除windows磁盘清理中的所有内容安全吗?

...磁盘清理中的项可以安全地删除。但是,如果您的计算机运行不正常,删除其中一些内容可能会阻止您卸载更新、回滚操作系统,或者只是排除问题,因此如果您有足够的空间,可以随时使用这些内容。 磁盘清理101 相关:在Wi...

  • 发布于 2021-04-09 08:15
  • 阅读 ( 212 )

用rsync同步数据的非初学者指南

...inux终端,您就可以继续阅读这个高级指南了。 在windows上运行rsync 首先,让我们的Windows读者和Linux专家站在同一个页面上。尽管rsync是为在类Unix系统上运行而构建的,但是没有理由不让您在Windows上使用它。Cygwin提供了一个很好...

  • 发布于 2021-04-11 11:39
  • 阅读 ( 164 )
ZackTea
ZackTea

0 篇文章

相关推荐