نصب Unison File Synchronizer
	
	
		نصب Unison File Synchronizer
	کد PHP:
	
apt-get install unison 
 
	کد HTML:
	
pico /root/.unison/default.prf
 کپی و جایگزین کنید:
	کد PHP:
	
# skip asking for confirmations on non-conflicting changesauto=true # the user interface will ask no questions at allbatch=true # Unison will request an extra confirmation if it appears that the entire replica has been deletedconfirmbigdeletes=true # Unison will use the modification time and length of a file as a `pseudo inode number' when scanning replicas for updates, instead of reading the full cont$fastcheck=true # the group attributes of the files are synchronizedgroup=true # the owner attributes of the files are synchronizedowner=true # prefer newer version of files in case of conflictsprefer=newer # the textual user interface will print nothing at all, except in the case of errors.silent=true # file modification times (but not directory modtimes) are propagated.times=true 
 
	کد PHP:
	
ssh-keygen -t dsa 
 
	کد PHP:
	
ssh-copy-id -i .ssh/id_dsa.pub user1@remote.machine.com 
 
	کد PHP:
	
unison /var/www ssh://remote.machine.com//var/www 
 
	کد PHP:
	
*/5 * * * * unison /var/www ssh://remote.machine.com//var/www &> /dev/null