KSH fetching files from server A onto server B and putting on server C
Dear Friends,
Sorry for this basic request. But I just started learning Ksh recently and still I am a newbie in this field.
Q: I have files on one server and the date format is 20121001000009_224625.in which has year (yyyy) month (mm) and date (dd). I have these files on server A. The task which I am trying to accomplish is: I need to fetch these files onto server B dated 30 days older, bzip them and put them on server C. This script would run as a cronjob in server B. All servers are sun solaris.
Could anybody please help me with the code on serverB? Any help would be greatly appreciated.
Currently I use scp to manually transfer the files onto server B from server A use bzip to compress them on server B and then again use scp to transfer them to server C(creating respective folders - eg. 201210 for oct 2012). But how can I include the conditions to check for name automatically (30 days old). how can i use scp as it prompts for passwords to be entered manually. Could you guide me accordingly please?
Basically what you do is:
create ssh-keys on server A, on server B, and on server C.
then put keys on whatever node you want to connect to.
So If I want to connect FROM A to C, I first have to put my "A" keys over on "C".
keys live in authorized_keys in a special directory under your login directory:
Your home directory cannot be other writable - has to be 755 or 750.
This User Gave Thanks to jim mcnamara For This Post:
Hi All
I need to transfer a file from a UNIX server to a windows server.
I saw that it is possible to do this using scp command by looking at the forum listed below:
... (2 Replies)
Hi Team,
I had a requirement to write a shell script which automatically transfer the files from unix server to windows server. I can able to unix to unix using Scp command. I am not sure how to do unix to windows.
I am very new on this concept.
Could you please help me or guide in... (4 Replies)
I need to transfer files from a Windows server to the Unix server and have to run some shell script on it to get the required output.
Is it possible to transfer files from Windows server to unix server through any shell script?
If so can you please help me with the details.
Thanks in... (8 Replies)
Hi,
I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script.
Can anyone help me in automating the script such that it... (3 Replies)
I have 3 servers A, B, C and server B is having some files in /u01/soa/ directory, these files i want to copy to server C, and i want to run the script from server A.
Script(Server A) --> Files at Server B (Source server) --> Copy the files to Server C(Target Server).
We dont have RSA key... (4 Replies)
Hi All,
I am generating report in a Linux server and once the report is generated the report(.txt file) needs to be automatically saved in a Windows servers.
So i am looking for a script to transfer the file automatically from Linux server to Windows server?
Please advise.
Thanks... (3 Replies)
We would be migrating unix solaries to Linux redhat.
Basically source is unix and target is linux.
i would like to copy entire file system unix/source/* to target linux/souce/*
but target linux has only folder setup so what ever files copied need to be placed in the linux server with same... (8 Replies)
Hi,
Below is the script which ftps the file from unix server and putting in a different directory(but on unix server)
How can i ftp the files from unix server and to place in a secure location on windows server? what changes needs to be done to the below script?
How can this be... (1 Reply)
Hi,
I am facing a weired problem in my FTP script. I want to transfer multiple files from remote server to local server everyday, using mget * in my script. I also, want to send an email for successful or failed FTP. My script works for file transfer, but it don't send any mail. There is... (2 Replies)