- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: TAR Help.....
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
11-18-2001 11:29 PM
11-18-2001 11:29 PM
TAR Help.....
I have 3 directories /home/classes ,home/lib, /home/config..
I need to take a backup of these three directories using "TAR".But while extracting i will declare an environment variable some thing like "TEST_HOME=/../.. . In this i will specify the path to extract the 3 directories...
How can we take perticular those 3 directories and how can we extract those directories in different paths...??
Any help please...
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2001 11:48 PM
11-18-2001 11:48 PM
Re: TAR Help.....
Try this:
cd /home; tar cv classes lib config (... or just *)
Then , when you want to extract, you can do this:
cd $TEST_HOME; tar xv
This will extact all the directories tarred into $TEST_HOME.
If you want a separate path for each directory, use a temp directory like so:
mkdir -p /tmp/extracts; cd /tmp/extracts; tar xv ; mv
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2001 11:56 PM
11-18-2001 11:56 PM
Re: TAR Help.....
:-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2001 12:00 AM
11-19-2001 12:00 AM
Re: TAR Help.....
Use tar's -T (or --files-from F)option to get names to extract or create from file F
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
11-19-2001 12:10 AM
11-19-2001 12:10 AM
Re: TAR Help.....
Appolozise for every one..Please correct me where i havent assign points...
Regards
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2001 12:21 AM
11-19-2001 12:21 AM
Re: TAR Help.....
See Dan's post of Nov 13 in this thread
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x316efd3f91d3d5118ff40090279cd0f9,00.html
Regards,
Deepak.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2001 12:38 AM
11-19-2001 12:38 AM
Re: TAR Help.....
I believe these are most likely
the threads you are looking for.
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0xfaebc6af36b7d5118ff10090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0xdcc8cf38d6bdd5118ff10090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0xd26cfd3f91d3d5118ff40090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0x7bcecf38d6bdd5118ff10090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0x8dfec6af36b7d5118ff10090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0xf0b6cf38d6bdd5118ff10090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0xf5b6cf38d6bdd5118ff10090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0x93cfcf38d6bdd5118ff10090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0x6a32630fe5c4d5118ff10090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0x4e670b0717d1d5118ff40090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0x1bcacf38d6bdd5118ff10090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0x0db74e49c5cdd5118ff40090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0xc1cd4e49c5cdd5118ff40090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0x66033d853cd9d5118ff40090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0x5ce1f715edc6d5118ff10090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0x06d1d08cc06fd511abcd0090277a778c,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0x48750b0717d1d5118ff40090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0x06d1d08cc06fd511abcd0090277a778c,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/ 1,,0x2c268ffa98a2d5118ff10090279cd0f9,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2001 01:51 AM
11-19-2001 01:51 AM
Re: TAR Help.....
Once again Appolozise....
Regards
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2001 06:56 AM
11-19-2001 06:56 AM
Re: TAR Help.....
If you create the tar using absolute pathnames for the files you backup, you will not be able to restore them to an alternate location. You will need to use relative pathnames for your backup.
HPUX 11.0's tar does not have either T or F option.
Deepak has the answer for you:
cd /home
tar cvf tarfilename classes lib config
cd $TEST_HOME
tar xvf tarfilename
Very important: be sure cd $TEST_HOME is successful before un-tarring. If not (for exampe the directory doesn't exist), you will be extracting into whatever directory you were in before trying to cd. After the cd command, check that $? = 0.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2001 08:17 AM
11-19-2001 08:17 AM
Re: TAR Help.....
I forgotten to mention that for the -T option, you will need to install GNU tar to have this option.
As already pointed out, the default tar that comes with HP-UX does not have it.
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
11-19-2001 07:51 PM
11-19-2001 07:51 PM
Re: TAR Help.....
If you backup using ./home/classes ,./home/lib, ./home/config
you will be able to restore anywhere you want.