- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- files transfer
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
Forums
Discussions
Discussions
Discussions
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
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
10-22-2001 07:59 AM
10-22-2001 07:59 AM
Nora
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2001 08:05 AM
10-22-2001 08:05 AM
Re: files transfer
If you are moving Unix-to-Unix I think I'd script the process with 'rcp'. If you really want to verify what you copied is what you think you copied, include remote shell commands to 'chsum' the file on both servers and compare the results.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2001 08:10 AM
10-22-2001 08:10 AM
Re: files transfer
You can either do through automated ftp or rcp. If you are particular about security, you can install ssh and use ssh too. You can accomplish your task using either of them. If you use ftp, you can check the files on the remote system using ls or dir command compare them against what you have on the local and copy only the difference. You need to do a little bit of scripting that does the following.
If you use ftp:
1) In the first ftp session,you will get a list of files through ftp's ls command. Then you compare them against the local files and generate a diff of files.
2) in the next ftp session, you will use the above list of files to 'get' from the remote system.
It's easier with /remsh/rcp/ssh/scp also
1) Check the files using remsh/ssh command. And determine the difference.
2) Use rcp/scp to copy the files.
My recommendation would be to use ssh/scp to get the files. If security is not a concern, you can easily do it through rcp/remsh. It's better to use r'commands than ftp as you will need to hardcode the passwords somewhere.
There are other softwares like Connect Direct etc., to accomplish similary kind of tasks.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2001 08:10 AM
10-22-2001 08:10 AM
Re: files transfer
#make sure no one is using the file.
RC=$(fuser -u $FILENAME 2>/dev/null |wc -l)
if [[ $RC = 0 ]]
then
ssp $FILENAME destsvr:
fi
The fuser command assures that no one is using the file.
Hope this helps.
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2001 08:24 AM
10-22-2001 08:24 AM
Re: files transfer
Rdist will do exactly what you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2001 08:25 AM
10-22-2001 08:25 AM
Re: files transfer
As every one said, I would rather go with rcp or scp ( If security is a concern)
you can use chksum to see the files copied properly or not
for rcp you have to deal with .rhosts file
GoodLuck
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2001 08:30 AM
10-22-2001 08:30 AM
SolutionWhen you say continously that could get to be a real resource hog; if you back that off to every few minutes then it becomes more manageable. I have a perl script (fileage.pl) I have used for a long time and it becomes the heart of my proposed solution. It returns a 0 if a file has NOT been modified with a certain period of time and non-zero otherwise.
Here is my cut at this but I don't guarantee the syntax is correct as I am doing this 'on the fly':
DIR=/xxxx/yyy
REM_HOST=bugs
INTERVAL=600
cd ${DIR}
ls | while read X
do
FNAME=${DIR}/${X}
fileage.pl -m -s ${INTERVAL} ${FNAME}
STAT=$?
if [ ${STAT} -ne 0 ]
then
rcp -p ${FNAME} ${REMHOST}:${FNAME}
fi
done
You could add more to this to check to see if you need to delete a file or if a file has not been modified but is not found on the remote server then do the transfer. In the above example, this should be set up as a cronjob fired off every 10 minutes (600 seconds).
I would use rcp as it is much easier to script.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2001 08:39 AM
10-22-2001 08:39 AM
Re: files transfer
You might want to look into rdist or if you want to send files both ways, rsync. Both are available at HP software porting and archive centers. One is http://hpux.cs.utah.edu/
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2001 10:29 AM
10-22-2001 10:29 AM
Re: files transfer
If your question is in 'how to detect when the files first arrive on the 1st server' (instead of how to copy them to the second server), then it is important to know how the files arrive on the 1st server, and what OS is sending them. For that, I would recommend the following:
1)Set up a dumb printer on your 1st UNIX server.
2)Then, set up a remote printer on wherever your files originate from, to do remote print to that new dumb printer on your 1st UNIX server. That will get your files over safely to your 1st UNIX box, and your dumb printer driver will know the minute they arrive.
3)Edit your 1st UNIX box's newly set up dumb driver to skip past fist 5 arguments (shift;shift;shift;shift;shift), and you'll have the name of the temporary spool file containing your newly arrived text.
4)Now you may copy or rcp or ftp it to your second server. There is no need to poll for your file's arrival - the lp spooler will do it for you.
Notes: This will only work with flat ASCII text files. Your dumb print driver will be found in /usr/spool/lp/interface/your_printer_name. If your arriving file is of large size, inside your print driver you may need to 'sleep' until you are sure that the whole file arrives, before you can copy it on. Also, with this remote printer setup, you can receive files from any other OS types capable of "lpr/lpd" (like IBM, NT, etc.)
Good luck.
Irine Gibilisco
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2001 12:53 PM
10-22-2001 12:53 PM
Re: files transfer
Best regards,
Nora