Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shankar-bavan/d4ce6f41c7763dadf538a128fa847d21 to your computer and use it in GitHub Desktop.
Save shankar-bavan/d4ce6f41c7763dadf538a128fa847d21 to your computer and use it in GitHub Desktop.
How To Synchronize Local And Remote Directories In Linux
https://www.atlantic.net/vps-hosting/how-to-use-rsync-copy-sync-files-servers/
sudo yum install rsync
Transfer Contents of a Directory with Rsync
There are a few options when syncing directory contents with rsync over SSH.
To transfer all files from a source directory to target on a remote host, enter:
rsync -at /var/www/directory/* root@135.181.46.161:/var/www/directory
Use -a instead of -r. -a means to reproduce file hierarchies, including special files and permissions. -r only means to recurse on directories. For a backup, you want -a.
https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-centos7
https://tt-inc.org/lsyncd-error-terminating-since-out-of-inotify-watches.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment