You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

OCI: How To Copy All Data Across Two Filesystems Using "rsync" Command

edited May 21, 2024 6:50AM in Linux

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.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!