在 Azure Linux VM 中,我们有一个 LVM,用于保存实时应用程序的数据 (1.2TB)。由于某些原因,我们希望将应用程序的数据迁移到另一个LVM,并停用旧的LVM。
我们希望以最短的停机时间实现这一目标。我们可以使用 rsync 使用什么开关/方法来实现此目的?
最佳答案
根据您的描述,您可以使用rsync 。
以下命令可以将一个磁盘复制到另一个磁盘。
rsync -avxHAX --progress /home/test/ /home/back
选项是:
-a : all files, with permissions, etc..
-v : verbose, mention files
-x : stay on one file system
-H : preserve hard links (not included with -a)
-A : preserve ACLs/permissions (not included with -a)
-X : preserve extended attributes (not included with -a)
另外,你可以引用这个question .
注意:我建议您可以先在您的测试环境中测试,然后在您的产品环境中进行。
关于linux - 将数据从一个安装迁移到另一个安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45623606/