- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Can I set a timeout to cp?
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
тАО06-03-2005 03:13 AM
тАО06-03-2005 03:13 AM
Re: Can I set a timeout to cp?
Now I get:
"A ] character is missing"
Any clue??
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2005 03:23 AM
тАО06-03-2005 03:23 AM
Re: Can I set a timeout to cp?
Now depending upon the size of the data to be copied you can also put a wait time for cp to comlpete. If it does not, kill cp and start database.
One catch here is to take into consideration the load on system/network load that will impact the copy time. And hence copy wait time needs to be adjusted.
To address this you can have another script/check in same script to keep comparing the source data and copied data.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2005 04:02 AM
тАО06-03-2005 04:02 AM
Re: Can I set a timeout to cp?
Seems an excelent idea. With "ping -vr
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2005 04:03 AM
тАО06-03-2005 04:03 AM
Solution1) Shutdown database
2) Create a vxfs snapshot of all your Oracle filesystems -- this will take only seconds
3) Restart your database
4) NFS exportfs your vxfs snapshots (read-only)
5) NFS Mount (read only) your snapshots on the client
6) Do the copies
7) NFS unmount the snapshots on the client
8) exports -i -u /yoursnapshot(s)
9) umount the snapshots
And yes, vxfs snapshot filesystems can be exported.
This will give you almost all the uptime of a hot backup with all the security of a cold backup. And in fact, now that time is of no consequence, you could backup to tape instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2005 06:07 AM
тАО06-03-2005 06:07 AM
Re: Can I set a timeout to cp?
Use it like this:
timeoutcp.pl -t 5400 file1 file2 file3 /mydestdir/xxx/
STAT=${?}
if [[ ${STAT} -ne 0 ]]
then
echo "Cp failed; status ${STAT}" >&2
fi
Invoke as timeoutcp.pl -u for usage; it does a cp -p but you can alter the system() call to do whatever you like.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-04-2005 07:37 AM
тАО06-04-2005 07:37 AM
Re: Can I set a timeout to cp?
made modifications to the test script so that it first pings the NFS server && if it's up kicks off the copy. Taking this approach the script aborts when either the cp succeeds or the timeout value is exceeded.
============================================
wait_time=30
timeout=300
timer=0
srcdir=/disc1/patches
destdir=/
while true
do
ping
RC=$?
let timer=$timer + $wait_time
if [[ $RC -eq 0 || $timer -ge $timeout ]]
then
echo "\WARNING: ...!\n"
break
fi
sleep $wait_time
done
============================================
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2005 05:45 AM
тАО06-05-2005 05:45 AM
Re: Can I set a timeout to cp?
>Now I get:
> "A ] character is missing"
you need to put a space between the "1" an "]"
while [ $exit_code -eq 1 ]
hth
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2005 05:59 AM
тАО06-05-2005 05:59 AM
Re: Can I set a timeout to cp?
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2005 08:36 PM
тАО06-05-2005 08:36 PM
Re: Can I set a timeout to cp?
Clay,
I'm very interested in your snapshots solution but how can I do it?
"Create a vxfs snapshot of all your Oracle filesystems -- this will take only seconds" -> How can I do this??
Also thanks for your perl script. I'll try to understand it to see what is the better script for me...
Bob,
I've assigned point to your 2├В┬║ login, thanks because that error is solved.
Now, I get another:
"sh[54]: test: Specify a parameter with this command."
Sandman,
I'll also analyse you script and assign you points accordingly.
Best Regards,
Eric Antun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2005 09:16 PM
тАО06-05-2005 09:16 PM
Re: Can I set a timeout to cp?
if [$TIMER ge $TIMEOUT]; then
then you need spaces wither side of the [ and ] and ge should be -ge etc
so it should read
if [ "$TIMER" -ge "$TIMEOUT" ] ; then