- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: rcp script
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
05-04-2005 08:22 PM
05-04-2005 08:22 PM
I have got the following problem with a small rcp script:
rcp `grep -l "^3.*COV" DER*TAR*` <>
As you can see this greps the dir for certain files and rcp's them to serverB.
There is another script cronned on serverB that fetches the files rcp'ed from server A and this is where my problem begins. The other script is cronned for every 5 mins and fetches the files as soon as it sees them resulting in truncated files as the files may not have completed rcp'ing across.
Is there a way of either renaming these files until they have been rcp'ed successfully and then renaming them back or checksuming the actual transfer to overcome this truncation issue????
Cheers
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2005 11:01 PM
05-04-2005 11:01 PM
Re: rcp script
On serverB, look for the cheecksum file first, if there your copy is finished. Do want you need to those files and blow away the checksum.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2005 11:20 PM
05-04-2005 11:20 PM
Re: rcp script
create a file with size and file details of files which are going to be RCPied. RCP this file at last.
Make your cron file to check the specific file contains this details. Your requirement will work correctly if you do like this.
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2005 12:38 AM
05-05-2005 12:38 AM
SolutionI would suggest a lockfile.
The script on machine A does a remshd and touches a file on machine B before it does its "real work".
When its done it removes the lockfile.
The script on machine B checks for the lockfile and wont process anything if the lockfile is present.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2005 01:06 AM
05-05-2005 01:06 AM
Re: rcp script
$ rsync -av -e remsh file1 serverb:/tmp
This will copy file1 to serverb:/tmp/.file1.
Read more about rsync at
http://samba.org/rsync/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2005 03:04 AM
05-05-2005 03:04 AM
Re: rcp script
Very helpful indeed. Its really a toss up between the 'lockfile' and the 'rsync' solutions; great stuff.
Cheers!