- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how do I ?
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
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
04-04-2002 07:37 AM
04-04-2002 07:37 AM
How would I tar everything in the /opt directory, scp to another system and untar it in the same directory. Any help is greatly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 07:41 AM
04-04-2002 07:41 AM
Re: how do I ?
tar cvf opt.tar opt/
rcp opt.tar SERVEUR:/
on SERVEUR
cd /
tar xvf opt.tar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 07:45 AM
04-04-2002 07:45 AM
Re: how do I ?
Try this:
# tar -cvf /tmp/opt.tar /opt
# rcp user_name@hostname:/tmp/opt.tar user_name@hostname:/tmp
# tar -xvf /tmp/opt.tar
Check 'man rcp' for details. Also remember that overwriting all files in /opt can cause troubles, unless you have the same OS and applications. Check the file system spaces before doing these.
HTH,
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 07:47 AM
04-04-2002 07:47 AM
Re: how do I ?
This is how it is to be done
1. cd /opt
2. tar cvf /dev/rmt/0m test *
3. rcp test abc:/ ( abc is the other server)
4. go to abc and do a tar xvf test.
Please ensure you have plenty of space under /opt or in case you a another mount point just go ther and repeat the steps excpet give the full path when you do the tar .
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 07:48 AM
04-04-2002 07:48 AM
SolutionIt is not advisable to copy /opt filesystem as most of the softwares in /opt are installed via swinstall and you may get into problems later while you try to upgrade them.
However, if you wish to continue, then it should be easy. I assume you have ssh access too.
#cd /opt
#tar cf - . |ssh other_host \(cd /opt\; tar xf -\)
If you want to use scp, you need to have a filesystem bigger than /opt where you need to temporarily dump the bundle.
#tar cvf /somewhere/opt.tar /opt
#scp /somewhere/opt.tar other_host:/somewhere
Login to the other host
#tar xvf /somewhere/opt.tar
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 08:10 AM
04-04-2002 08:10 AM
Re: how do I ?
Another quick way to copy is:
find /opt | cpio -ov | compress - | ssh
HTH
raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 09:30 AM
04-04-2002 09:30 AM
Re: how do I ?
What about just
scp -rp /opt remotehost:/
???
live free or die
harry