Rsync, or Remote Sync, is a fast, versatile and free command-line tool that lets you transfer and sync files and directories to local and remote destinations in an efficient and secure way. .
Why use Rsync?
When copying or moving large no. of files using tools like cp and mv may leave ur data in inconsistent state with part of it still in the original location and part of it in the target destination in case of any interruptions.
These tools takes more time as well. Even for a plain copy, restarting the copy is less than ideal as it will recopy everything that already got copied. This same issue applies to the SSH copy utility scp.
Whereas Rsync is very fast and efficient, copying only the changes from the source and offering customization options.
How to Install Rsync?
On Ubuntu -
apt install rsync
On RedHat -
yum install rsync
Rsync syntax -
rsync options SOURCE DESTINATION
-rAllows to sync data recursively but does not keep ownership for users and groups, permissions, timestamps, or symbolic links.
-aThe archive mode behaves like d recursive mode but keeps all file permissions, symbolic links etc.
-zUsed to compress data during transfers to save space.
-bPerforms a backup during data synchronization.
-hShows the numbers in the output in a human-readable format.
-nDoes a dry run. Used for testing before the actual synchronization takes place.
-eInstructs the rsync to use the SSH protocol for remote transfers.
-progressDisplays the transfer progress during synchronization.
-vVerbose output. Displays the details of the transfer.
-qUsed to suppress the output for the rsync command and options.
SRC - define the Source directory.
DEST - define the Destination directory.
USER - define the Remote username.
HOST - define the Remote hostname or IP Address.
Synchronize Directories locally -
To copy one file to another directory on a local machine, type in the source file's full path, followed by the target destination.
# rsync -r test1/ test2
Plz Note that there is a trailing slash (/) at d end of the first argument (test1/) in d above commands.
rsync -r test1/ test2
This is necessary to mean βd contents of test1β. The alternative, w/o d trailing slash, would place test1, including d directory, within test2.
Always run rsync command in a dry run mode first.
Rsync provides a method for doing this by passing the -n or --dry-run options. The -v flag (for verbose) is also necessary to get the appropriate output.
# rsync -rnv test1/ test2
# rsync -rnv test1 test2
Copy Multiple Files Locally -
To copy multiple files with rsync, add full paths of the source files:
# rsync -v test1/abc.txt test1/def.txt test2/
Copying a File or Directory from Local to Remote Machine -
Add the IP address & d destination after d source directory. Remember to put a colon (:) after d remote host's IP address, with no spaces before the destination.
Please note that the target directory on the remote host was not created before. The rsync tool takes care of that and create a directory for you and copy the data.
Copy a File or Directory from a Remote to a Local Machine -
Rsync supports transferring files from a remote server to your local machine.
To pull a directory from a server, specify its IP address before the source.
What was web1 or web?
The very first stage of development on the World Wide Web where only simple static websites used to exist.
Those were the times when Personal web pages (mostly static pages) used to be hosted on ISP-run web servers, or on free web hosting services.
What is web2?
Today's internet is all about web2. As per @Wikipedia Web 2.0 refers to websites that emphasize user-generated content, ease of use, participatory culture and interoperability for end users where websites and apps allow anyone to create content and share.
1. Keep the Kubernetes cluster up to date. 2. Ensure That Only Authorized Images are Used in Your Environment 3. Limit Direct Access to Kubernetes Nodes 4. Create Administrative Boundaries between Resources
5. Keep Secrets Secret! 6. Define Resource Quota 7. Implement Network Segmentation 8. Apply Security Context to Your Pods and Containers 9. Restrict API access. 10. Restrict SSH access.
ss command is a tool that is used for displaying network socket related information on a Linux system.
nmap -
Nmap is short for Network Mapper. It is an open-source Linux cmd-line tool that is used to scan IPs & ports in a nw & to detect installed apps. Nmap allows nw admins to find which devices r running on their nw, discover open ports & services, and detect vulnerabilities.
Everything you need to know about Secure Socket Layer.
A Thread π
What is SSL ?
Itβs a protocol for encrypting and securing communications that take place on the Internet. It's now replaced by an updated protocol called TLS (Transport Layer Security) some time ago.
The main use case for SSL/TLS is securing communications between a client and a server, but it can also secure email, VoIP, and other communications over unsecured networks.
I rarely use password login. And many folks out there even today aren't sure about ssh keys and their usage.
Everything about SSH Keys.
A Thread π
What is SSH?
SSH is a secure protocol used as the primary means of connecting to Linux servers remotely. It provides a text-based interface by spawning a remote shell. After connecting, all commands you type in your local terminal are sent to d remote server and executed there.
Today, the SSH protocol is widely used to login remotely from one system into another, and its strong encryption makes it ideal to carry out tasks such as issuing remote commands and remotely managing network infrastructure and other vital system components.