2010-07-25 00:47:02 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#!/bin/sh
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-12-01 14:26:27 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								dir="/home/"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-07-25 00:47:02 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								case $(hostname) in
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								   kr)
							 | 
						
					
						
							
								
									
										
										
										
											2010-12-01 14:26:27 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      other="root@ikn.ethz.ch"
							 | 
						
					
						
							
								
									
										
										
										
											2010-07-25 00:47:02 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								   ;;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								   ikn)
							 | 
						
					
						
							
								
									
										
										
										
											2010-12-01 14:26:27 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      other="root@kr.ethz.ch"
							 | 
						
					
						
							
								
									
										
										
										
											2010-07-25 00:47:02 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								   ;;
							 | 
						
					
						
							
								
									
										
										
										
											2011-07-21 10:59:03 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								   *)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      echo "I am confused, where I am?"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      exit 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								   ;;
							 | 
						
					
						
							
								
									
										
										
										
											2010-07-25 00:47:02 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								esac
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-07-21 10:59:03 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								sudo rsync -av \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								   --exclude /home/services/eth-usbhd  \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								   --exclude /home/services/usbhd      \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								   --delete-before --delete $dir $other:$dir
							 |