Linux uses shell scripts to monitor the integrity of rsync file transfers

  
                

When using rsync to transfer large files, Linux system cannot guarantee the complete transmission of files because I am not around. At this time, you can write a shell script to monitor whether rsync transfers data to ensure that the file is interrupted when it is halfway. do not know.

There are a server should all be transferred today to the program website another server b up, but the only time away from work one hour, in order to work on time, write a simple shell script Monitor if there is any transmission.

System: centos 5.x

Required software: rsync

Script content:

#! /bin/bash

file=`du -sm /var/www/vhosts/

Copyright © Windows knowledge All Rights Reserved