LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-14-2011, 03:43 PM   #1
edhe1
Member
 
Registered: Sep 2006
Posts: 115

Rep: Reputation: 0
Understanding tar


I want to restore, from backup, my openoffice documents, icedove folders, korganizer data, and iceweasel bookmarks; and it is a real chore finding where squeeze stores these things. The greater problem though, is that ark can't handle absolute path names, and my understanding of tar is limited.

I tried doing a general extract of my old /home directory, into my new squeeze distro, using tar -xzpPvf (file name), - and this I learned to be a mistake - because the file structure has been modified in squeeze. What was once /home/user/....odt is now /home/user/Documents/.....odt. Things stopped working in squeeze after I did the extract. I know now to only extract specific 'safe' items.
I have read the man page on tar, but still do not see how to get past the absolute path names difference?

As I understand it, tar looks for the same data path in my present system, and then replaces (or not) the data, depending on the tar options sent.

For example, with the bookmarks, is there a command that would extract the archive data into a 'safe place', and then I could later place it where it needed to be?

Last edited by edhe1; 05-14-2011 at 03:45 PM.
 
Old 05-14-2011, 04:02 PM   #2
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 675
Blog Entries: 11

Rep: Reputation: 36
Quote:
Originally Posted by edhe1 View Post
For example, with the bookmarks, is there a command that would extract the archive data into a 'safe place', and then I could later place it where it needed to be?
This should not be so hard to do. Move the tar.gz file to the 'safe' directory, and then cd to that directory. execute 'tar xvzf <filename>.tar.gz' to extract the info to the 'safe' location. tar will recreate the file structure that was originally archived at the new directory. Hope this helps.
 
Old 05-14-2011, 04:03 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
On my system, by default tar extracts to the current directory. If I want to extract to somewhere else, I use -C. For example:
Code:
tar -xjvf /path/to/archive.tar.bz2 -C /location/to/extract/to
Was that what you were looking to do?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
"Invalid tar magic" error msg. when I try to tar ldmud *.tar file in DSL pixxi451 Linux - Newbie 4 07-04-2010 08:32 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
help understanding .tar.gz files lucky_1811 Linux - General 6 02-07-2004 11:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration