File Missing When Grabbing Files from SFTP Server using SCP Command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers File Missing When Grabbing Files from SFTP Server using SCP Command
# 1  
Old 12-24-2008
Java File Missing When Grabbing Files from SFTP Server using SCP Command

Hi,

I have this problem where sometimes my files would go missing when I schedule my crontab to run the SCP command to get file from the SFTP server.

My crontab will run the scripts at an interval of 3 minutes (between the two scripts) The following is the setting in my crontab.

0,6,12,18,24,30,36,42,48,54 0-8 * *
1-6 /usr/alliance/scripts/script1
3,9,15,21,27,33,39,45,51,57 0-8 * * 1-6 /usr/alliance/scripts/script2

After I've done the testing, I checked on the log and I found this message:-
>>>> Wed Dec 24 03:25:58 TAIST 2008 Start of SCP RECEIVE ..
mttest1.good | 8B | 0.0 kB/s | TOC: 00:00:01 | 100%
total 8
-rw------- 1 scpus33 alliance 8 Dec 24 03:27 mttest1.good
<<<< Wed Dec 24 03:26:09 TAIST 2008 End of SCP RECEIVE ...

but the weird thing is, the file mttest1.good was not in my unix server.

This is the log of the file that was successfully transferred to my unix server:-

>>>> Wed Dec 24 05:48:00 TAIST 2008 Start of SCP RECEIVE ..
total 8
-rw------- 1 scpus33 alliance 8 Dec 24 05:48 mttest6.good
<<<< Wed Dec 24 05:48:10 TAIST 2008 End of SCP RECEIVE ...

Hope somebody can help me with this problem.
# 2  
Old 12-24-2008
gingervitus,

Did you try to simulate and run the script manually to check if the script is putting the data in the right location?

If you can paste the script code here it will be better to analyze and troubleshoot your problem.

Cheers
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Need some help regarding file transfer between server (sftp/scp)

Hi All, Need some help regarding file transfer between server. Suppose we have system-A and system-B. To transfer file from system-A to system-B we usually share the public keys of system-A to system-B and do scp/sftp to transfer a file. Is it possible that public key of system-B can be... (3 Replies)
Discussion started by: abhi_123
3 Replies

2. UNIX for Beginners Questions & Answers

Automate splitting of files , scp files as each split completes and combine files on target server

i use the split command to split a one terabyte backup file into 10 chunks of 100 GB each. The files are split one after the other. While the files is being split, I will like to scp the files one after the other as soon as the previous one completes, from server A to Server B. Then on server B ,... (2 Replies)
Discussion started by: malaika
2 Replies

3. HP-UX

Shell script to sftp files to file server.

Hi, I am looking for a shell script to sftp to a file server and copy all the files from a directory after the script is run. The server name should be a user input parameter and of-course the username/password as well. Rest all should be handled by the script. I tried with below snippet:-... (2 Replies)
Discussion started by: happysingh
2 Replies

4. Shell Programming and Scripting

SFTP files to a file server.

Hi, I am looking for a shell script to sftp to a file server and copy all the files from a directory after the script is run. The server name should be a user input parameter and of-course the username/password as well. Rest all should be handled by the script. I tried with below... (3 Replies)
Discussion started by: happysingh
3 Replies

5. UNIX for Dummies Questions & Answers

Use screen command in AIX to scp file to other server

Hello, Please assist me in using screen command in AIX to scp file to other server Best regards, Vishal (10 Replies)
Discussion started by: Vishal_dba
10 Replies

6. Shell Programming and Scripting

Grabbing value from file and run command in ``

Hi ALL, How can I make a script take data from a file and execute the commands within `` in the file n put that that in a variable? for i in `cat file` do file=`grep -i key file` cp ${file} test done file /tmp/`date +y`log /tmp/unix`date +y`log (1 Reply)
Discussion started by: 3junior
1 Replies

7. Shell Programming and Scripting

FTP/SFTP/SCP Files

Hi, I have a process which FTP's the files from one server to another server. Sometimes only half or a part of the file is delivered to remote location, but on the end log says FTP is successful. But ideally file in full is not delivered to remote location. How can i catch these kind of errors... (2 Replies)
Discussion started by: forums123456
2 Replies

8. SuSE

scp/sftp only files which are not found.

Hi, I need to write a script to scp/sftp files from server A to server B..But i do not want to overwrite the files which already exist on server B. Anyone has a script which does the above Regards (2 Replies)
Discussion started by: SystemEng
2 Replies

9. Shell Programming and Scripting

Error copying files from Unix (Solaris10) to Windows Server 2003 using scp/sftp

Hi, I have generated a Public/Private Key Pair in Solaris Unix (source) server and deployed the Public key in Windows 2003(target) server .ssh directory of user profile. When i try to connect(ssh, scp, sftp) from Unix, i'm getting below error message. Sun_SSH_1.1, SSH protocols 1.5/2.0,... (0 Replies)
Discussion started by: ajaykumarb
0 Replies

10. UNIX for Dummies Questions & Answers

scp or sftp to Window server

Dear Unix Gurus, I have a question to confirm before I proceed to script my program. I'm currently running on IBM AIX Ver 5.3. I just like to know if it's compatible to use scp or sftp between AIX and Wintel server? I'm trying to scp or sftp a file from AIX to Window server and I was... (1 Reply)
Discussion started by: lweegp
1 Replies
Login or Register to Ask a Question