plz help me by creating required shell script
Dear all
I am new to shell script. And this is my first post to this site as well as this forum. I would like to tell this forum that I require shell script, which is regarding transfers of files from a specific directory in a server A to server B on a specific directory through sftp command. Shell script should also required two things like first one is, at file level it should check bytes related to that file on server A, after transfer of that file on server B , it should have the same number of bytes as on server A, if the size does'nt match then it should repull that file from server A to Server B. For e.g if a file name f1 having 2000 bytes on server A, after transfer of that file on server B, it should have 2000 bytes on server B also, if the size does'nt match then it should repull that file from server A to Server B. And the second requirement in that shell script is that suppose there are 1000 files in server A in a particular directory, after transfer of those files to server B it should check that 1000 fiadles are tranfer to Server B if the connection is break during transfer then it should retransfer those files to server B which are not present on server B but are present on server A or retransfer all the 1000 files to server B again.
Shell script require proper logging like if transfer not happen then it should write to a file that tranfers not being able to done properly and vice versa. Shell script should pickup the password or passphares from a file called 'pass' while during running of the script. A source or destination path of the server in a shell script, should be change by putting the path in a simple file called 'dest_path' or 'sour_path' file.
Well I am writing the details of Source server & Destination server details
SOURCE SERVER
Solaris OS, HostName is CCSS1,IP is 192.168.11.1 ,Path is /opt/home/peri/NORTH/MIS-CCSS
DESTINATION SERVER
Window OS, HostName is CFS,IP is 192.168.11.2 , Path is C:\Program Files \openSSH\NOT_MIS\Incoming\CCSS\NORTH
Autossh is not there.
While transfering files from solaris server to windows server , we have to create a log of the names & bytes of all files which have been properly transfer or how many files have been properly transfer before broken down of network. Sftp should be done in binary mode. Plz use only general command which I can execute it on sun solaris server.
I want to thanks to this forums in advance
|