Rsync random start script and rsync script
Server
1 #!/bin/sh 2 # chkconfig: 2345 21 60 3 # description: Saves and restores system entropy pool for \ 4 #create by xiaohu 5 #2014.06.02 6 #This script is the Rsync service
transferred (see previous errors) (code) at MAIN.C (1039) [sender=3.0.6] Check the service End Directory Permissions other users should have write permission Oh, doneScript Implementation synchronization: Here the script is the client data synchronization to the server side, the other can be defined by themselves:#!/bin/bash#use for:sh 33.sh test serversysuser=testexport mokuai=test1export port=7001src_dir=/root/lijq/serverip= 192.168.2.222serverno=$
One-click rsync server shell script configuration in CentOS
1. Save the following code as a file and upload it to the server named rsync. sh.
#! /Bin/bash
# Rsync Written by zhumaohai
# For more information please visit http://www.centos.bz
Echo "Please input the rsync
In this article we introduce a shell script that uses the rsync command to back up files/directories on your local Linux machine to a remote Linux server. Using this script will implement the backup interactively, and you will need to provide the host name/IP address and folder location of the remote backup server. We use a separate list file in which you need to
rsync startup script01#!/bin/bash www.ahlinux.com02#03# RSYNCD This shell script takes care of starting and stopping04# standalone rsync.05#06# Chkconfig:-99 5007# Description:rsync is a file transport daemon08# Processname:rsync09# config:/etc/rsyncd.conf1011# Source Function Library12. /etc/rc.d/init.d/functions1314Retval=015Rsync= "/usr/local/bin/
The simple use of the remote SCP file shell expect is implemented in shell scripts with expect http://myunix.blog.51cto.com/191254/1095074http:// Jie-hui-520.blog.163.com/blog/static/60074301201022610217249/linux rsync Synchronous Practice Http://my.oschina.net/congqian/blog /137847#!/bin/bash/usr/loca/rsync/bin/rsync-vazu-progress–delete–password-file=/etc/rsync
Today there is a server A to transfer all the Web site program to another server B up, but away from work time is only 1 hours, in order to work on time, simply wrote a shell script to monitor whether there is transmission, I first in the server a looked at the total size of the program 12G, with Du- SM View is 11517, the server will not be someone to send things up, so I can be assured that the capacity will not become larger.
System: CentOS 5.x
So
Installing the configuration xinetd Super daemon and rsync is very simple. In the study, I wrote an automated deployment of the script, after testing can be used, has done the basic optimization, although simple, but still want to record, for everyone to reference, look forward to you can help me to guide twos.The script is as follows:#!/bin/bash# determine wheth
Use rsync can achieve file backup synchronization, a realistic use of the scene is, in the background upload template files, need to sync to another server, through other domain name address access, this need to upload files in the background automatically synchronized to the external access to the server.
Log the sh script for an rsync sync file as an example:
rsync sync failure (win08--->ubuntu12.04)
Source data server for windows2008, install Cwrsyncserver, regular sync process card die do not quit, the script to solve this problem
#!/bin/bash
Pri=/root/rsync.pwd
Ist=/root/ign.list
Sf=root@223.*.*.*::test
Dt=/var/www
Log=/var/log/cdhome_rsync.log
Pid=/tmp/cdhome_rsync.pid
Fi=/tmp/cdh_test
date= "Date +%y-%m-%d~%k:%m:%s"
sync= "/usr/bin/
In this article we introduce a shell script that uses the rsync command to back up files/directories on your local Linux machine to a remote Linux server. Using this script will implement the backup interactively, and you will need to provide the host name/IP address and folder location of the remote backup server. We use a separate list file in which you need to
☆☆☆ Daily automatic backup site data and database upload ftp☆☆☆
This way, the main is a script (including compressed site data and database, upload), and then use the cron command every day in a specified period of time to run, see the script code (script information needs to set itself)
The code is as follows
Copy Code
Feature Description:The script is used to transfer the local directory to the remote server on a regular basis (in conjunction with crontab), with each execution generating a time-named directory, and the current version of the data is linked to a symbolic link with the first name, so it is easy to find and recover. Before the data transfer is complete, it is transferred to the TEMP directory, which is named "Time-incomplete". Backups older than 10 da
running with xinetd, run the following command:
# chkconfig rsync on# service xinetd restart
The administrator can modify the/etc/xinetd. d/rsync configuration file to suit your needs. For example, you can modify the configuration line
server_args = --daemon
Add the rsync service options later.
4.3. Run the rsync serv
Rsync is a data image backup tool in Linux. It can be seen from the software name-remotesync. Rsync supports most Unix-like systems, including Linux, Solaris, and BSD.
I. rsync
CommandIntroduction
Rsync is a command for Synchronizing files to a Linux system. It can synchronize two computers to files and directories, an
1. Using Ssh+rsyncYou only need to open the SSH service on the server side and start the rsync service in xinetd to useA. Incremental synchronizationrsync-av/src-dir/. [email protected]:/dest-dir/.B. Mirroring synchronizationRsync-av--delete/src-dir/. [email protected]:/dest-dir/.Features: Simple configuration, no need to configure rsyncd.conf profile, but requires user authentication during synchronizationNote: You can create an auto-sync encryption
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.