- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Check return code via FTP
Operating System - HP-UX
1753841
Members
8331
Online
108806
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 09:33 AM
02-12-2004 09:33 AM
Re: Check return code via FTP
O.K. Samuel one last note on one of the method we use.
The destination knows when the file is complete when we send a "marker file". In one case the ftp jobs consists of sending up to 100 files. We cut out the file names sent from the log and send it as a recap.txt that they use as notification all is complete. Another job uses the byte count from the log file sent in another type of "marker file".
As stated, there are legions of errors that may be detected and legions of ways to let the destination know the ftp is completed. Some people send the ftp as one file name, then perform another ftp to rename the file when complete.
It's all a matter of what works for you and what your people are comfortable with. There is no real "best way". It is totally dependent on your environment, skill sets, and the users involved.
Again, best of luck.
dl
The destination knows when the file is complete when we send a "marker file". In one case the ftp jobs consists of sending up to 100 files. We cut out the file names sent from the log and send it as a recap.txt that they use as notification all is complete. Another job uses the byte count from the log file sent in another type of "marker file".
As stated, there are legions of errors that may be detected and legions of ways to let the destination know the ftp is completed. Some people send the ftp as one file name, then perform another ftp to rename the file when complete.
It's all a matter of what works for you and what your people are comfortable with. There is no real "best way". It is totally dependent on your environment, skill sets, and the users involved.
Again, best of luck.
dl
"I'm not dumb. I just have a command of thoroughly useless information."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2005 12:03 AM
10-18-2005 12:03 AM
Re: Check return code via FTP
Hi Samuel,
Try this one:
export TMPLOG=/home/enz./.mixzftplog
export TRANSFER=/home/enz./.transfer.log
FTP=/home/operator/backup/ftpmixz.cmd
echo "user user passwd">$FTP
echo "lcd /home/enz.">>$FTP
echo "bin\nprompt\nmput filenaam">>$FTP
echo "quit">>$FTP
#
echo "\nBegin enz. " `date '+%d %b %Y %X` >>$TMPLOG
ftp -n -v ipnummer <$FTP 2>$TRANSFER 1>&2
cat $TRANSFER|grep "Transfer complete" >/dev/null
ERRORLEVEL_TRANSFER="$?"
if [ $ERRORLEVEL_TRANSFER -ne 0 ]; then
echo "\nTransfer FAILED: user probleem, connection probleem, enz " `date '+%d %b %Y %X` >>$TMPLOG
else
echo "\nTransfer complete " `date '+%d %b %Y %X` >>$TMPLOG
fi
Try this one:
export TMPLOG=/home/enz./.mixzftplog
export TRANSFER=/home/enz./.transfer.log
FTP=/home/operator/backup/ftpmixz.cmd
echo "user user passwd">$FTP
echo "lcd /home/enz.">>$FTP
echo "bin\nprompt\nmput filenaam">>$FTP
echo "quit">>$FTP
#
echo "\nBegin enz. " `date '+%d %b %Y %X` >>$TMPLOG
ftp -n -v ipnummer <$FTP 2>$TRANSFER 1>&2
cat $TRANSFER|grep "Transfer complete" >/dev/null
ERRORLEVEL_TRANSFER="$?"
if [ $ERRORLEVEL_TRANSFER -ne 0 ]; then
echo "\nTransfer FAILED: user probleem, connection probleem, enz " `date '+%d %b %Y %X` >>$TMPLOG
else
echo "\nTransfer complete " `date '+%d %b %Y %X` >>$TMPLOG
fi
Jos de Ruiter
- « Previous
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP