- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to use tar in following senario
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
12-13-2000 07:29 AM
12-13-2000 07:29 AM
I need the steps to tar up the source box directory and restore the directory to the target box, including all subdirectories.
Thanks
Dave
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2000 07:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2000 07:51 AM
12-13-2000 07:51 AM
Re: How to use tar in following senario
on node1, cd dirA
tar -cf - *? remsh node2 "(cd /dullpath/dir2;tar -xvf -)"
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2000 07:53 AM
12-13-2000 07:53 AM
Re: How to use tar in following senario
Posibly you have tar'ed a sym link ? then you should use the h option within tar.
Here the steps for your job:
At hostA:
cd
tar cvhf - . |gzip -c >/var/tmp/dir.tar.gz
ftp hostB
binary
cd /var/tmp
put /var/tmp/dir.tar.gz
At hostB:
cd
gzip -dc
(I have used the combination with gzip to reduce the ftp traffic)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2000 07:55 AM
12-13-2000 07:55 AM
Re: How to use tar in following senario
tar -cvf /home.tar /home
to list the contents of a tar backup
tar -tvf /home.tar
ftp to new box
perform tar restore
tar -xvf /home.tar
Good Luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2000 07:58 AM
12-13-2000 07:58 AM
Re: How to use tar in following senario
What is the command line you are using for tar?
If you are able to use remsh then you would also be able to use rcp with the -rp options to preserve timestamps and copy recursively, eg:
rcp /data hostb:/newdata
recursively copies the directory /dat on the local system to the the director /newdata on a system with a hostname of "hostb"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2000 07:58 AM
12-13-2000 07:58 AM
Re: How to use tar in following senario
Victor is right, that's the way to go.
I'd like to add one more (quite obvious) point: make sure you have read permission on all files and subdirectories on host A, and that you have write permission in the destination directory on host B.
The easiest would be to be logged in as root, this means that the file /.rhosts (on host B) should have one line with the name of host A.
Best regards,
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2000 11:17 AM
12-13-2000 11:17 AM
Re: How to use tar in following senario
On the target server I have added the source server name to /.rhosts and /etc/hosts.allow files.
On the source server I have added the target server name to /.rhosts and /etc/hosts.allow files.
When I run the following command:
tar -cf - * | remsh hammer "(cd /home/dave;tar -xvf -)"
I get:
rcmd: hammer: Unknown host, should I be using IP address?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2000 11:45 AM
12-13-2000 11:45 AM
Re: How to use tar in following senario
Of course you could use the IP address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2000 12:36 PM
12-13-2000 12:36 PM
Re: How to use tar in following senario
That /etc/hosts was the issue, I'm using Victor's solution although the others worked as well.
Thanks to you all !!!
Dave