将数据从一个装载迁移到另一个
Migrate data from one mount to another
在 Azure Linux VM 中,我们有一个 LVM,用于保存实时应用程序的数据 (1.2TB)。由于某些原因,我们想将应用程序的数据迁移到另一个LVM,并停用旧的。
我们希望以最短的停机时间实现这一目标。 switches/method 我们可以使用 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。
注意:建议先在测试环境中测试,再在产品环境中测试。
在 Azure Linux VM 中,我们有一个 LVM,用于保存实时应用程序的数据 (1.2TB)。由于某些原因,我们想将应用程序的数据迁移到另一个LVM,并停用旧的。
我们希望以最短的停机时间实现这一目标。 switches/method 我们可以使用 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。
注意:建议先在测试环境中测试,再在产品环境中测试。