12-24-2008
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.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. Shell Programming and Scripting
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
3. SuSE
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
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
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
6. UNIX for Dummies Questions & Answers
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
7. Shell Programming and Scripting
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
8. HP-UX
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
9. UNIX for Beginners Questions & Answers
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
10. UNIX for Beginners Questions & Answers
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
CRON(8) System Manager's Manual CRON(8)
NAME
cron - daemon to execute scheduled commands (Vixie Cron)
SYNOPSIS
cron
DESCRIPTION
Cron should be started from /etc/rc or /etc/rc.local. It will return immediately, so you don't need to start it with '&'.
Cron searches /var/spool/cron for crontab files which are named after accounts in /etc/passwd; crontabs found are loaded into memory. Cron
also searches for /etc/crontab and the files in the /etc/cron.d/ directory, which are in a different format (see crontab(5)). Cron then
wakes up every minute, examining all stored crontabs, checking each command to see if it should be run in the current minute. When execut-
ing commands, any output is mailed to the owner of the crontab (or to the user named in the MAILTO environment variable in the crontab, if
such exists).
Additionally, cron checks each minute to see if its spool directory's modtime (or the modtime on /etc/crontab) has changed, and if it has,
cron will then examine the modtime on all crontabs and reload those which have changed. Thus cron need not be restarted whenever a crontab
file is modified. Note that the Crontab(1) command updates the modtime of the spool directory whenever it changes a crontab.
SEE ALSO
crontab(1), crontab(5)
AUTHOR
Paul Vixie <paul@vix.com>
4th Berkeley Distribution 20 December 1993 CRON(8)