使用 lsyncd 同步文件

https://unix.stackexchange.com/questions/307046/real-time-file-synchronization

https://github.com/axkibe/lsyncd

 

----
-- User configuration file for lsyncd.
--
-- Simple example for default rsync.
--
settings {
	statusFile = "/home/root/lsyncd.stat",
	statusInterval = 1,
	logfile = "/home/root/lsyncd.log",
	maxProcesses = 2,
}

sync{
	default.rsync,
	source="/home/root/test_sync_src/",
	target="/home/root/test_sync_dist/",
	delay = 1,
	rsync = {
        	append  = false,
        	compress = true,
		group = true,
		owner = true,
    	}	
}

  

posted @ 2018-04-19 16:00  xuchenCN  阅读(391)  评论(0编辑  收藏  举报