- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- Re: Script for FTPing files to another server
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО03-01-2006 03:42 PM
тАО03-01-2006 03:42 PM
Script for FTPing files to another server
I wish to write a script in TRU64 (5.1) for following purpose:
1. To ftp some critical ascii & binary files from production server to DR server on daily basis.
2. Change ownership(chown) and permissions (chmod) of files thus transferred to DR server.
I have following concerns/requirements:
1. If possible, I wish to run it in background. Whenever this file is created in Prod server, it should be able to detect it and initiate a ftp to DR server.
2. I do not wish to embed any password (if required) into the script.
Can anyone provide any suggestion, pointers, source of TRU64 scripting reference books that can help me out with the above?
Any help will be appreciated.
Regards.
- Tags:
- ftp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2006 04:52 PM
тАО03-01-2006 04:52 PM
Re: Script for FTPing files to another server
one cares about the password), or else it
uses a real user name and password, in which
case you would need, but don't really want,
the password in your script. As you're
_sending_ files, anonymous FTP is a poor
choice, and if you're trying to keep the
password hidden, normal FTP is not much
better.
Assuming that something like NFS is not
available, you could use a scheme like
"sftp" or "scp", which use the same
authentication schemes as "ssh", including
host-based and public key. This would
obviate the inclusion of the password in your
script.
"man sftp" suggests that chown and chmod
are not available within sftp, but you could
use separate "ssh" commands after the sftp
transfers are complete.
You can use "cron" to run the script
periodically, and it could check the source
directory ("ls" or, perhaps, "find") to see
if there are any files to be sent.
There must be a zillion scripts like this
which have already been written, but I don't
have one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2006 04:55 PM
тАО03-01-2006 04:55 PM
Re: Script for FTPing files to another server
then the ASCII-binary distinction is not
important.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2006 10:40 PM
тАО03-01-2006 10:40 PM
Re: Script for FTPing files to another server
echo "user username password
asc
cd $FTPDIR
lcd $LOCALDIR
mput *
site chmod
bye" | ftp -i -n ftp.personal.com.py
If you don't want to specify the password in the script, you must use scp with public keys authentication. Your public key must be generated without a passphrase. See man ssh-pubkeymgr.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 10:50 PM
тАО03-02-2006 10:50 PM
Re: Script for FTPing files to another server
Can you also provide pointer to some scripting reference material that I can refer to?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2006 01:04 AM
тАО03-03-2006 01:04 AM
Re: Script for FTPing files to another server
A better way is to control the ftp client from expect (http://expect.nist.gov/) or use a scriptable ftp client, such as kermit (http://www.columbia.edu/kermit/index.html, http://www.columbia.edu/kermit/ftpclient.html).
Note that Kermit can also be used for secure ftp connections, see http://www.columbia.edu/kermit/ckermi80.html#x3.2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2006 01:17 AM
тАО03-03-2006 01:17 AM
Re: Script for FTPing files to another server
might try asking Google about something like:
"shell script" ftp
One thing it turned up, for example, was a
pretty complete Kermit solution:
http://www.columbia.edu/kermit/ftpscripts.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2006 04:43 PM
тАО03-03-2006 04:43 PM
Re: Script for FTPing files to another server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2006 05:06 PM
тАО03-03-2006 05:06 PM
Re: Script for FTPing files to another server
[Forehead smack!] Doh! Why didn't I think
of that, and suggest it two days ago?!!
No, wait. I did. Never mind.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2006 04:50 AM
тАО03-08-2006 04:50 AM
Re: Script for FTPing files to another server
You'll need to build it from source and put a symlink to it in /usr/bin/rsync.
Mario