OCI: How To Copy All Data Across Two Filesystems Using "rsync" Command
Applies To
Oracle Cloud Infrastructure
Linux OS
Goal
Two different filesystems are mounted in a Linux system, for example:
/mnt1
/mnt2
There is a need to copy all the data from /mnt1 (origin) to /mnt2 (destination).
Solution
The rsync utility can be used to copy the data from /mnt1 to /mnt2:
$ rsync -avxHAX --progress /mnt1/ /mnt2
The order of the source and destination directories is important. Source is first, destination is second. Notice that there is a '/' after /mnt1 - this is to ensure that only the directories/files inside /mnt1 are copied, not the actual /mnt1 directory itself.
Tagged:
0