Skip to content
Advertisement

Migrate data from one mount to another

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?

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement