Last active
April 18, 2024 13:08
-
-
Save caot/1eb6ae70d2d28b2b77197eb432d8e777 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rsync -avz -P -e ssh rhel-server-7.5 uid@192.168.1.203://home/uid/mnt_VMs_BACKUP/ | |
-P same as --partial --progress | |
rsync -Rv -P $(gd 3d23ae1b 3dfee952 | grep -E '.js' | egrep -v html) ./webteam-js/ | |
rsync -Rv -P $(gd 9c45cdb0 3dfee952 | grep -E '.js|.css') webteam-js-release-3.4.28-20201116 | |
# remote to local | |
# rsync -az source to-destination | |
rsync -avz -P -e ssh uid@host:///home/path ./ | |
rsync --delete : delete the files that is not present on the sender's system | |
rsync -v : Verbose (which gives detailed information) | |
rsync -e : specify the ssh as remote shell | |
rsync -z : compress file data | |
rsync -r : recurse into directories | |
rsync -a : archive mode | |
Now how can we keep two folders in sync always? Just add a cron job that runs the rsync | |
command to the do the sync operation as frequently as you want it to be. |
BOATS CAUGHT IN HURRICANE IAN AT HAULOVER INLET https://youtu.be/ASyfJnf_SP8
Category 4 Hurricane Ian Hits Southwest Florida - Sept. 28, 2022 https://youtu.be/_0WGIcg0Mt0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rsync -avz -P --exclude={"media/videos",".hg"} -e ssh SRC TARGET