Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help please with .netrc and ftp autologin.

Status
Not open for further replies.

flypoo

MIS
Mar 22, 2005
44
0
0
AU
Hi all.

I am trying to backup my sendmail server. I decided the best way would be to tar all the files and ftp it to another server that backs itself up to tape every day.

No problems with tar, or cron, but I am trying to add a 1-liner command to my shell-script for the uploading of the file.

I have created the .netrc with the login details and a test macro. The auto login part is working great, but I can't get the thing to execute the commands in the macro. This is my .netrc....

machine x.x.x.x login admin password ** macdef test1
cd /tmp
ls

~
~

Is this syntax correct? I have searched, and this looks correct to me. Maybe I have Tuesdayitis.

There are no errors reported. I can execute the macro manually by typing $ test1.

Thanks heaps.





 
Nevermind!!!!!

I have learned that you need to call the macro 'init'

thanks!
 
ftp myhost.com < EOF
user admin
password blahblah
bin
mget mymail.tar
quit
EOF

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top