gpt4 book ai didi

linux - 将数据从一个安装迁移到另一个安装

转载 作者:太空宇宙 更新时间:2023-11-04 05:18:23 25 4
gpt4 key购买 nike

在 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com