Rsync makes it easier and faster to synchronize two machines, such as Laptops and Desktops. This provides an efficient algorithm and multiple options. In addition, if you do not like the command line operation, you can use several graphical tools to make rsync easier.If you are using both a laptop and a desktop computer, you may need to synchronize them in a time
Set up rsync remote file synchronization service under Centos6.5
I. Server Installation
1. System Environment
Server: centos6.5 Factory environment (set by default during system installation), IP: 192.168.10.185
Client: Remote logon terminal xshell5 or securecrt (please check the installation and usage ),
IP: 192.168.10.186
2. Install Rsync
Log on to the system 192.168.10.185 through the terminal (xshell h
and devices.
2) You can exclude the synchronization of specified files or directories, which is equivalent to the packaging command tar.
3) You can keep the permissions of the original file or directory, and keep all attributes such as time, hard and soft links unchanged.
4) incremental synchronization is implemented, that is, only the changed data is synchronized, so the data transmission efficiency is higher.
5) You can use rcp, rsh, ssh, and other
again in one minute. If there is one, it will be successful.Linux Firewall uses iptables, so we should at least let the defined rsync server port pass through on the server side, and the client should also pass through.Iptables-a input-p tcp-m state -- state NEW-m tcp -- dport 873-j ACCEPTStart rsync:/Usr/bin/rsync -- daemon -- config =/etc/rsyncd. conf$ Rsync_H
Rsync is a data mirroring Backup tool under Unix-like systems.It has the following characteristics:The entire directory tree and file system can be saved in a mirror.It is easy to keep the original file permissions, time, soft and hard links and so on.Install without special permissions.Fast: When you synchronize for the first time, rsync copies the entire content, but only the modified files are transferre
as follows:[Root @ www/etc] # Cat/etc/rsyncd. scrtMsyn: XXXXXXXXXIn addition, this file can only be read and written by the root user. Note that for security purposes, the attribute of this file must only be readable by the owner; otherwise, rsync will refuse to run. We can set its property to 600:[Root @ www/etc] # chmod 600/etc/rsyncd. scrtAfter these files are configured, you need to start the rsyncd service on the master server:[Root @ www/etc] #
. Secret backupuser@192.168.1.2: backupuser/opt/backup/
# Summary
You can place the synchronization script in the corntab on the client to regularly synchronize data.
# Common global options** Motd file **: Set the welcome message.
** PID file **: This option tells daemon to write its process ID to the specified file. If the file already exists, daemon stops running, instead of overwriting the original file.
** Port **: Set the port of the daemon running listener. If daemon is run by inetd, this
First, rsync basic configuration and introduction1. What is rsync?rsync (rsync-a Fast, Versatile (general), remote (and local) file-copying tool An open source, fast, versatile tool that enables full and incremental simultaneous local or remote data backup is available on multiple operating systems.
password set on the master server and enter the password: 123456 ljzhou is the user name in the specified password file: linuxsirhome indicates that the password is stored in rsyncd. the module name/tmp set in conf is from the server directory (192.168.0.248/tmp) till now, between the two hosts of rsync (192.168.0.220/tmp and 192.168.0.248/tmp) rsync synchronization has been configured. You only need to ex
follows:[Email protected]/etc]# CAT/ETC/RSYNCD.SCRTMsyn:xxxxxxxxxAnd the file can only be read and written by the root user, note that for security purposes, the properties of this file must be primary readable, otherwise rsync will refuse to run. We can set it to a property of 600:[Email protected]/etc]# chmod 600/ETC/RSYNCD.SCRTOnce these files are configured, you will need to start the RSYNCD service on the primary server:[Email protected]/etc]#/u
Considering the security of server data, I consider adding a backup server to achieve better redundancy through data synchronization.Linux has a very good command. Rsync can implement differential backups, so let's say how it's used:The Rsync service is not turned on in the installation of Ubuntu default installation. There are 3 steps to be made:1, modify the/et
anonymous transmission.
basic syntax via remote shell: rsync [OPTION] [USER@]HOST:SRC DEST uses a remote shell (such as SSH, rsh) to copy the contents of the remote machine to the local machine. The SRC address path is delimited by a single colon ":". rsync [OPTION] SRC [user@]host:dest uses a remote shell (such as rsh, SSH) to copy the contents of the local machine to the remote machine. The DEST addre
Tags: HTTP ar OS Div using the for SP strong File
Transferred from 91ri
About rsync
Rsync (Remote synchronize)-the software that implements remote synchronization in Linux can synchronously update files and directories of two computers. When Synchronizing files, you can keep additional information such as the source File Permission, time, and soft and hard links. It is often used to distribute and syn
@ www/etc] # cat/etc/rsyncd. scrtMsyn: xxxxxxxxxIn addition, this file can only be read and written by the root user. Note that for security purposes, the attribute of this file must only be readable by the owner; otherwise, rsync will refuse to run. We can set its property to 600:[Root @ www/etc] # chmod 600/etc/rsyncd. scrtAfter these files are configured, you need to start the rsyncd service on the master server:[Root @ www/etc] #/usr/local/bin/
properties, equivalent to-rlptgod-V: Displays detailed (verbose) information for the synchronization process-Z: Compress when transferring files (compress)-H: Keep Hard connection files-A: Preserve ACL attribute information--delete: Delete a file with the destination location but not the original location--checksum: Determines whether to skip a file based on the checksum of the objectOffsite Backup: Operations on machine B: 192.168.200.129:To configure how the source is represented:The
is the same as above manual synchronization--delete means that if the server side deletes this file, then the client will also delete the file accordingly, maintain the true consistency, delete the local directory of redundant files--Exclude "logs/" means that the files in the/web1/logs directory are not backed up.--exclude "conf/ssl.*/" means that the files in the/web1/conf/ssl.*/directory are not backed up.If needed can be placed in the Crontab scheduled task in the interval of the synchronou
The Rsync Service FAQ Summary explains:==================================
Iptables firewall enabled by Rsync server
client-side error behavior: No Route to host[Email protected]]# rsync-avz/etc/hosts [email protected]::backup rsync:failed to connect to 172.16.1.41:no route to Host (113) Rsyncerror:error in socket IO (code ten) at CLIENTSERVER.C (124
/private key. Use the following rsync command to start synchronization:
# Rsync-v-a-z-e SSH -- delete/www/
In this command,-V indicates verbose;-A indicates synchronizing all files and folders;-Z indicates compressing data, which reduces the transmission traffic; -e ssh indicates that SSH is used as the connection meth
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.