LINUX programming

Moderators: ITA
Number of threads: 1339
Number of posts: 2924

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
automating ftp for back-up purpose Posted by mgmcelwee on 9 Feb 2007 at 7:09 AM
As far as I can tell we have an O/S2 box right now that is using mptn to automate a backup system that a programmer before me had fixed up. It appears that he has a *.cmd file ran on the task scheduler that calls the ftp statement, ex. call ftp jack < c:\mptn\ECT\jack. And that jack file has the command $getjack*. There is also a netrc file that appears to be point to the machine names defined by a HOSTS file that is running the macro jack and performing the ftp commands, but I can't figure out for the life of me exactly how it all ties in together. I have been tasked to move this automated backup system to a new machine running SUSE Linux Enterprise Server 9. I have compiled and installed the newest version of mptn and tried setting everything up the same, but I am not having any success in automating these ftp commands on a timed schedule. I know I can put this in the crontab to schedule it, but I'm not real sure how to get it setup correctly. Does anyone have any suggestions on what I can do from this step on, or is there another approach in automating the ftp commands that may be easier for me to setup? Thanks in advance to anyone that may help me in my situation.

Thanks,

Mathew G. McElwee
Micro Systems Support Specialist
NWGA Health District
mgmcelwee@dhr.state.ga.us
Report
Re: automating ftp for back-up purpose Posted by mgmcelwee on 9 Feb 2007 at 12:14 PM
This message was edited by mgmcelwee at 2007-2-9 12:15:51

This message was edited by mgmcelwee at 2007-2-9 12:15:5

I wrote the following script and named it ftpstartup

#!/bin/sh
ftp < autoftp

I then wrote the following file named autoftp

open mysite
username
password
lcd /localdirectory
cd /backupdirectory
binary
get file.tar.gz
delete file.tar.gz
bye

Now when I run the script to automate my ftp it is not filling out the password field for me causing it to pause on the password. I have to manually put in my password for it to complete the process, but I want it to be able to login and get and delete the files I need. Does anyone have any suggestions why my password is not being inputed during the above process.

: Thanks,
:
: Mathew G. McElwee
: Micro Systems Support Specialist
: NWGA Health District
: mgmcelwee@dhr.state.ga.us
:








 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.