Transfer file on Linux - rsync
=================================================================
The `rsync -avzP --progress` command in Linux is used to synchronize files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. Here's what each option means:
cmd:
this cmd will show the process status as well when the file is being copied to another server
rsync -avzP --progress /oracle/backup/backups/ABC40/Full/ABC_FULL4k27uor3_1_1_20231002.bkp.tar.gz username@ipaddress:/location/of/destination/path
- `-a, --archive`: This option is a quick way of saying you want recursion and want to preserve almost everything.
- `-v, --verbose`: This option increases the amount of information you are given during the transfer. By default, `rsync` works silently³.
- `-z, --compress`: With this option, `rsync` compresses the file data as it is sent to the destination machine, which reduces the amount of data being transmitted³.
- `-P`: The `-P` option is equivalent to `--partial --progress`, which keeps partially transferred files and shows progress during transfer³.
- `--progress`: This option shows the progress of the transferred files.
For example, if you want to synchronize a directory with a remote server and show the progress, you can use:
```bash
rsync -avzP --progress /path/to/local/directory username@remote:/path/to/remote/directory
```
Please replace `/path/to/local/directory` with your actual local directory and `username@remote:/path/to/remote/directory` with your actual remote directory. Note that these commands should be run in a terminal window.
Tags:
LINUX