-1

In Azure Linux VM we have an LVM that holds the data(1.2TB) of a live application. For some reasons, we want to migrate the data of the application to another LVM and decommission the old one.

We want to achieve this with minimal downtime. What switches/method we can use using rsync to achieve this?

A_K
  • 81
  • 8

1 Answers1

0

According to your description, you could use rsync.

The following command could copy one disk to another.

rsync -avxHAX --progress /home/test/ /home/back

The options are:

-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)

Also, you could refer to this question.

Note: I suggest you could test in your test environment firstly and do in your product environment.

Shui shengbao
  • 18,746
  • 3
  • 27
  • 45
  • The mount is live (application using it), would this command work on live mount? And would it resume and copy only delta on second run when application is stopped? – A_K Aug 11 '17 at 05:42
  • @A_K Yes, I test in my lab, it works on this scenario. When you rsync, don't need stop your app. But when you modify your app configuration, you need restart it. – Shui shengbao Aug 11 '17 at 05:43
  • @A_K use rsync, when you do it second, it is incremental replication. – Shui shengbao Aug 11 '17 at 05:45