Tags: represents classic pat HTML remote host FST verbose targe fstabThere are many data backup tools under Linux, the most used is Rsyns (remote synchronization)Synchronizing Remote data like SCPSynchronizing Local data like CP[Email protected]:~# rsync/etc/passwd/tmp/1.txtCopy the/etc/passwd file to/tmp and rename it to 1.txtIf you are unfamiliar with rsync, yo
Rsync: Remote synchronization, you can synchronize data locally, will not overwrite the previous data, but the first to determine the existing data and the difference between the new data, only the data will not be the same part of the overlay.# yum Install Rsync.x86_64-yLocal synchronization[Email protected] ~]# rsync-av/etc/passwd/tmp/passwordsending incremental file listpasswdsent 959 bytes received B Yt
:
Incremental backup, only the modified content is transferred
Can be decompressed in real-time during transmission, reducing bandwidth consumption
Can keep the original file permissions, events, soft and hard links
Native replication supported, remote replication supported
3. Command parameters:-A represents archive mode, which backs up all content in the directory (including content in subdirectories), and maintains soft li
Project needs to obtain the real-time progress of rsync backup, mainly using the Subprocess module of the pipeline function, online check is someone wrote this: Popen = subprocess. Popen ([' Ping ', ' www.baidu.com ', '-N ', ' 3 '], stdout = subprocess. PIPE) while True:print Popen.stdout.readline () to Subproces
The project needs to obtain the real-time progress of the
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
If the server disables password logon, you must use KEY,RSYNC-E "Ssh-i key" to resolve it, but the password requires non-interactive input (manual input), and scheduled task execution cannot be manually guarded.Combining expect can realize automatic input password
Instance Code
The code is as follows
Copy Code
#!/usr/bin/expectSet Timeout 30Spawn Rsync-avz--delete--exclude-from
1 Configure the Rsync server, client, see previous article/www Backup to Rsync192.168.1.11/tmp/backup in 192.168.1.10web server2 Download and install INotifywget http://github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gzUnzip./configure make make Install3 IntroductionInotify-tools provides two command-line tools:Inotifywait: Class for continuou
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
, files are moved into the monitored directoryIn_create, create a new file or subdirectory in the monitored directoryIn_delete, file or directory is deletedIn_delete_self, self-deletion, that is, an executable file deletes itself when executedIn_move_self, self-moving, that is, an executable file moves itself at execution timeTest creationTest Deletetest off - writetest shutdown - when writing, creation can also monitorSimplified outputSometimes the restart will fail , so put it in the rc.local.
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/
Oracle automatic backup script and Oracle backup script
If you don't talk much about it, paste the Code directly. The specific code is as follows:
#! /Bin/sh #*********************************** * ****************************** # File: oraclebak. sh # Creation Date: 17:57:32 # Last Modified: 17:57:34 #
One, separate backup1. Classic backup of the whole library: backup as compressed backupset database include current controlfile plus archivelog Delete all input;2, tablespace:backup tablespace name;3, Data files: Backup datafile N; (N: Specific data file number select File_name,file_id,tablespace_name from Dba_data_files;)4, Control files:
Share a MySQL database shard backup script (original) and a mysql database shard backup script
Share a MySQL database shard backup script (original)
Development ideas:
1. path: Specify the bac
Simple Mysql backup BAT script sharing in Windows and mysql backup bat script
Preface
This document describes a simple BAT script for Mysql backup in Windows.MysqldumpCommand to back up a specified Mysql database to a file in th
I have always wanted to share with you my experiences and experiences on how to automate O M of business systems in windows, but I have never been able to do so due to time and work. Now we have posted a simple automated and timed script for online hot-standby db2 data to learn and make progress together. @ Echo offREM Create by fengzhanhai on 2010.12.23 Used by backup database db2REM --- tasks: Run at 24
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.