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
02-13-2002 07:57 AM
02-13-2002 07:57 AM
tar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2002 08:02 AM
02-13-2002 08:02 AM
Re: tar
not possible with tar if you used the full directory path when creating the tar backup.
tar -cf /dev/rmt/0m /tmp/file1
--> will be restored to /tmp/file1
cd /
tar -cf /dev/rmt/0m tmp/file1
--> can be restored below current working directory.
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2002 08:03 AM
02-13-2002 08:03 AM
Re: tar
If the files were archived with the leading edge, you cannot extract them to another directory.
Say you tarred using this format,
tar cvf /dev/rmt/0m /home
Now you cannot restore home to another directory. But if you tarred using this,
cd /
tar cvf /dev/rmt/0m home
you can restore it to any other directory, say /temp
cd /temp
tar xvf /dev/rmt/0m
You can also try the solution suggested by harry in the link below if you have backed up using absolute path,
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x38d6cf38d6bdd5118ff10090279cd0f9,00.html
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2002 08:04 AM
02-13-2002 08:04 AM
Re: tar
If they were written with relative paths, then it is easy. You just cd to the dir you want to restore to and extract from the tape:
# cd /mydir
# tar -xvf /dev/rmt/0m somedir/somefile
or
# tar -xvf /dev/rmt/0m ./somedir/somefile
If the files were written to the tape using absolute paths, its a bit more difficult, but not impossible. You can try using pax for this ('man pax' for more info):
Here's an example from the pax man page:
To read the archive a.pax, with all files rooted in the directory /usr in the archive extracted relative to the current directory, enter:
# pax -r -s ',//*usr//*,,' -f a.pax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2002 08:05 AM
02-13-2002 08:05 AM
Re: tar
You need to use 'relative path' methord here. While backing up your data, you have to privide the relative paths. For eg: if you want to backup /home/dir1 and restore it to /usr1/dir1, then:
# cd /home/dir1
# tar -cvf /dev/rmt/0m .
# cd /usr1/dir1
# tar -xvf /dev/rmt/0m
This will restore the dir1 to the current directory. If you are using 'absolute path' for backing up data (tar -cvf /dev/rmt/0m /home/dir1), that will restore the data to the original location.
HTH,
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2002 08:05 AM
02-13-2002 08:05 AM
Re: tar
you can recover files from tar archive to relative path if the archive was created with relative path. Full path - to full path.
Later,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2002 08:08 AM
02-13-2002 08:08 AM
Re: tar
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2002 08:09 AM
02-13-2002 08:09 AM
Re: tar
Confirm you cannot
Best is to copy the current contents to another place
restore tar
move restored files to new place
move back originals
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2002 08:14 AM
02-13-2002 08:14 AM
Re: tar
First use tar tvf to see if the tarfile was created with relative or absolute paths. If relative, cd to the directory you want and the files / dirs will be extracted relative to that directory.
If created with an absolute path, use pax (see Patrick's suggestion).
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2002 08:17 AM
02-13-2002 08:17 AM
Re: tar
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x589bd5fab40ed6118ff40090279cd0f9,00.html
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2002 08:21 AM
02-13-2002 08:21 AM
Re: tar
Check this out:
http://us-support2.external.hp.com/cki/bin/doc.pl/sid=3ac31176034e2576cd/screen=ckiDisplayDocument?docId=200000047257225
HTH,
Shiju