- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script to copy
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
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
12-25-2001 11:38 PM
12-25-2001 11:38 PM
Our users always copy files (20gb +) from one machine to other. They do this copy as non-root user. I would like to facilitate them with a script or program that ensures following
1) Check space availablity on the target machine for a sucessful copy.
2)Which file is being copied and how many files are left to copy.( Continuous Update)
3)Space available one the target (Continuous update)
4)a log which tells which files were unable to copy and for what reason.
Basically I require your valueble inputs on
1) Do I need to write a C-program or a Shell Script will do for this.
2) How can I make this script work for flavours like HP, Sun, Linux.
If you already have some kind of script which does any of the above, I can customize it suit my environment.
Thanks,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2001 11:46 PM
12-25-2001 11:46 PM
Re: script to copy
Will you be considering NFS?
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2001 01:26 AM
12-26-2001 01:26 AM
Re: script to copy
Will there be any problem with links if I use nfs ?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2001 01:36 AM
12-26-2001 01:36 AM
Re: script to copy
What sort of links are you referring to?
What is the intention of this regular file transfer ie. as a central storage area so that the local storage can be freed? That will decide whether NFS would be suitable for your scenerio.
If these files need to be accessed by the same person who uploaded it later in time, NFS and NIS would be appropriate, with respect to ease of use for the user and ease of maintenance for the administrator.
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2001 02:01 AM
12-26-2001 02:01 AM
Re: script to copy
Iam refering to symbolic or hard links.
The pupose of this copy is to clone Oracle Apps from Production to Test to test out patches etc.,
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2001 04:55 AM
12-26-2001 04:55 AM
SolutionOne way is to use dual links (pvlinks) to mirrored LVs. Resynchronize the LVs with their mirrors once a day from the production system to the test system via the links. Keep the mirrors split for the rest of the day. However, initial setup can be quite tedious unless the test machine is the exact same configuration as the production (eg. no. of disk controllers).
For the script method if you insist on it,
1) Check space availablity on the target machine for a sucessful copy.
You have to use a combination of bc or awk (for summing up the sizes) and SSH to connect to the target machine to perform a bc or awk on the target machine.
2)Which file is being copied and how many files are left to copy.( Continuous Update)
SCP gives you a continuous update via a progress bar as the transfer takes place. So does NCFTP. Both does not come default with HP-UX.
4)a log which tells which files were unable to copy and for what reason.
Check the exit code of the SCP command and for each exit code, echo a detailed explanation of the error.
1) Do I need to write a C-program or a Shell Script will do for this.
2) How can I make this script work for flavours like HP, Sun, Linux.
A shell script needs only a shell interpreter. A C program still needs compilation on the target system if it is a different platform and version (re-compilation). Personally, I prefer a shell script because it is more flexibile and portable (works with the built-in shell interpreter on all HP, Sun and Linux platforms).
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com