Skip to content

Instantly share code, notes, and snippets.

@caot
Last active April 18, 2024 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caot/1eb6ae70d2d28b2b77197eb432d8e777 to your computer and use it in GitHub Desktop.
Save caot/1eb6ae70d2d28b2b77197eb432d8e777 to your computer and use it in GitHub Desktop.
$ 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.
@caot
Copy link
Author

caot commented Apr 6, 2021

rsync -avz -P --exclude={"media/videos",".hg"} -e ssh SRC TARGET

@caot
Copy link
Author

caot commented Oct 2, 2022

BOATS CAUGHT IN HURRICANE IAN AT HAULOVER INLET https://youtu.be/ASyfJnf_SP8

@caot
Copy link
Author

caot commented Oct 2, 2022

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