![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| IP Networking Learn TCP/IP, Internet Protocol, Routing, Routers, Network protocols in this UNIX and Linux forum. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| automated ftp. | sangfroid | Shell Programming and Scripting | 10 | 05-07-2007 11:52 AM |
| process vs task | hana | UNIX for Dummies Questions & Answers | 2 | 07-02-2006 06:32 PM |
| Automated FTP | shauche | UNIX for Advanced & Expert Users | 11 | 07-11-2002 02:08 AM |
| FTP automated? | n9ninchd | UNIX for Dummies Questions & Answers | 6 | 05-18-2001 10:21 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Every day i ftp tar.gz a file from the production server to a back up machine.. This task creates way to much traffic on the network at the end of the day and puts and undo load on the production machine during operation hours. i would like to create a script that would automatically fire off the ftp at like 2:00 am so that the transfer occurs when there is little or no load on the network. if anyone has suggestions on how to accomplish this, PLEASE let me know...
thanks.. --e0 loworderbit@aol.com |
|
|||||
|
hmm... write a script on the server that is launched daily using the cron (man crontab)... have that script ftp to your workstation or wherever and grab the file. The automated FTP will probably require a .netrc file in your user directory or wherever you ftp to to get the file.
However, if you are having to tar the file manually every day, write a script on the workstation side to do that for you a few minutes before the server script executes... once again, utilizing the crontab. Good luck and let me know how it goes. Strange... those other replies both popped up while I was writing... ummm... take their advice. ![]() Last edited by ober5861; 08-29-2001 at 02:40 PM.. |
|
|||||
|
Quote:
The line "ftp -nv >&4 2>&1 |&" is a little harder. The "|&" turns the process into a co-process that allows subsequent "print -p" statements to send lines to the co-process' standard-in and "read -p" to read from its standard-out. So ksh forks a copy of itself and fiddles with the fd's 0 and 1 until this it set-up. But it leaves the rest of the fd's alone. Then it encounters ">&4" which causes it to set the ftp process' standard out to whatever 4 is. Well since 4 is a copy of 1 before the co-process, we are back to writing to the original shell's standard out. Lastly, the 2>&4 does the same thing for standard error. I could've used "2>&1" at this point for the same effect. This is hard to explain, but I hope this helps. |
|
||||
|
Ftp
thanks for all of the help.. i guess i should have mentioned that i am running sco openserver.. i dont know if it matters or not, but the more information the better.... anyway, it looks like the best way to do this is to set up a script and use crontab..
manually, i was using the get command from the back up machine, but if its all the same, put from the production machine will work fine. now, its time to get down to the creation of the script and setting up cron to run it... my unix background is about three weeks, but i have been an (i apologize in advanced) NT admin for over a year, so please forgive my ignorance. anyway, if any of you would like to assist me in setting this up i would be very gratefull... This website, Unix: the complete reference, and sco unix in a nutshell are the only resources i have so far, so i am relying on you all a little... thanks again... e0-- |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| linux, mtime, sendmail |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|