Usually we will use this command
rsync --dry-run -a --mkpath --no-o --no-g --no-p -P -c SRC/ DST/
Remove --dry-run
to actually copy the files rather than merely comparing
Remove -c
to make it faster by comparing mod-time and size rather than checksum
--archive, -a archive mode; equals -rlptgoD (no -H,-A,-X)
--mkpath create the destination's path component
-P same as --partial --progress
--recursive, -r recurse into directories
--links, -l copy symlinks as symlinks
--times, -t preserve modification times
--owner, -o preserve owner (super-user only)
--group, -g preserve group
--perms, -p preserve permissions
-D same as --devices --specials
--devices preserve device files (super-user only)
--specials preserve special files
--partial keep partially transferred files
--progress show progress during transfer
The above command can be simplified as
rsync --dry-run -rlt --mkpath -P -c SRC/ DST/
You can think of a trailing /
on a source as meaning "copy the contents of this directory" as opposed to "copy the directory by name"
Examples:
rsync --dry-run -a --mkpath --no-o --no-g --no-p -P -c rsync://192.168.43.1:8873/sdcard/DCIM/Camera/ ./
rsync --dry-run -a --mkpath --no-o --no-g --no-p -P -c rsync://192.168.43.1:8873/sdcard/Pictures/Screenshots/ ./
- Other necessary directories