directories and files you want to back up.
# Limit access to private LANs
Hosts allow = 192.168.55.0/255.255.255.0 10.0.55.0/255.255.255.0
Hosts deny = *
Max connections = 5 # the maximum number of connections is 5
Motd file =/etc/rsyncd. motd
# This will give you a separate log file# Log file =/var/log/rsync. log
# This will log every fileTrAnsferred-up to 85,000 + per user, per sync# Transfer logging
Stream (code) at IO.C (759) [receiver=3.0.6]Close or configure IptabelesTurn on the 873 Port or close the iptables directlyBecause I'm a samba server, I'm using an internal network, so I closed the iptables before. Client-side settingsInstall rsync .Set the rsync boot upEdit User Password fileVim/etc/rsyncd/ryncd.secretsKingvon:testHere are Some common parameters of the
/tmp/--password-file=/etc/rsync.password----to back up local data when you operate this commandRsync excludes a file:Exclude individual filesRsync-avz--exclude=/tmp/a/tmp/[email protected]::backup--password-file=/etc/rsync.passwordExclude Multiple FilesRsync-avz--exclude={2,4,5,6}}a/tmp/[Email protected]::backup--password-file=/etc/rsync.passwordAdvantages of Rsync:1. Incremental backup synchronization, socket support (daemon), centralized backupDisad
Tags: Add file Properties 1.0 let rsync common options default Sync Tool Listen port passwordLinux file Sync Tool-rsyncInstall packageyum install -y rsyncRsync Common Options
-A: Archive mode, which means to transfer files recursively and maintain all properties;-rlptgod;-r: Synchronize the directory to add, similar to CP when adding r;-V: Display some i
I. Introduction (do not want to see directly can skip)Migrate Emos servers, the new server has been completed after the test, and then very important work is to complete the old mail system in the mail data migration, the choice of copy of the way naturally, but will inevitably lose some of the mail (in this period received mail), so take into account rsync.
Rsync is a remote data synchronization tool that
Rsync is a data mirroring Backup tool under Unix-like systems--remote sync. is a fast incremental backup tool remote Sync, which supports local replication or synchronizes with other SSH and rsync hosts.
By building rsync server and client, it is easy to solve the problem o
rsync file sync backup from Linux to LinuxFirst, the environmentServer (server side) that needs to back up files: 192.168.1.201 (RHEL 5)Server (client) receiving backup files: 192.168.1.202 (CENTOS 5)Second, installation configuration1. Server-side configurationA, using the system default installation of Rsync edit/etc/rsyncd.conf file, if not a new one.Vi/etc/rs
group to root, the maximum number of connections is 36000, the directory is not allowed to change, then we set the log directory, process and lock files. The following content structure is very similar to the writing of NFS, with published catalogs, descriptions, and read-write and object-oriented.When starting this service we will install the XINETD Daemon service because rsync is a background process. So you have to rely on xinetd to start.Modify t
is installed on the server, set the iptables on the server to open the 837 port.
Iptables-a input-p TCP--dport 873-j ACCEPT
4, the server side will be rsync in the form of daemon launch
Rsync--daemon--config=/etc/rsyncd.conf
5, on the B machine will be the rsync password written to the file, on the client, only need to enter a password, for example:
Vi/etc/
Description
There is a directory/var/www/test/public/below, there are a lot of files, directories, but I just need to sync one of the 2 directories (JS,CSS). Using exclude to exclude other files, directory exclusion is certainly possible, but because other files, directories are very many, in the exclude exclusion obviously too time-consuming; or 2 line rsync direct sy
This article describes the problem of using rsync to synchronize two machine directories under Linux. After using Rsync synchronization, you can keep the directory consistent (with delete operations).
Data synchronization method
1, pull data from the host
The process that is started on the standby machine
Sync command:
LSYNCD on which server to start, this server is like when the server is synchronized, other servers if more files will be deleted, fewer files will be synchronized from this server.
Modifying the contents of the file will also be synchronized
Rsync can achieve synchronization/backup of files, install configuration step to Linux under rsync Backup/Sync files
LSYN
local machine. This mode is started when the SRC address path contains a single colon ":" delimiter.such as: rsync-avz [email protected]:/home/user/src./src4) Copy files from the remote rsync server to the local machine. This mode is started when the SRC path information contains the "::" delimiter.such as: rsync-av [email Protected]::www/databack5) Copy files f
1. Configure two node synchronizationThe previous post has shown how to synchronize a host. This time we'll add a host to synchronize. There is no duality in the method.1. First display our console:Last time the content of 192.168.2.103 synchronization 192.168.2.102. This lets 192.168.2.104 nodes synchronize the contents of 192.168.2.102.Install the rsync and xinetd services on 192.168.2.104 first: Start the Rsync
1. Configure two node synchronizationThe previous post has shown how to synchronize a host. This time we'll add a host to synchronize.There is no duality in the method.1. First display our console:Last time the content of 192.168.2.103 synchronization 192.168.2.102. This lets 192.168.2.104 nodes synchronize the contents of 192.168.2.102.Install the rsync and xinetd services on 192.168.2.104 first: Start the Rsync
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.