LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-08-2009, 06:02 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
tar file without remove existing data


I want to use tar command to backup file ,( tar -cvf device file ) , but I found that if I use this command , it will overwrite the existing data in the tape , can advise how can I keep the existing data if I use tar backup ? thx
 
Old 06-08-2009, 08:34 AM   #2
ozminh
Member
 
Registered: Aug 2007
Posts: 73

Rep: Reputation: 19
see '-r' and '-A' in man page
 
Old 06-08-2009, 11:37 AM   #3
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
ust:

First of all you can preserve the old tar files by the switch -k (--keep-old-files), or you may change the label by the -V switch. Or if you want to modify the old file only you can -r to append or -A to catenate as pointed by ozminh above. To get full benefit of this wonderful program read the manual--

ust@host-$ man tar

Hope this helps.

Goodluck.
 
Old 06-10-2009, 01:55 AM   #4
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
thx replies ,

but I still have problem , what my case is I have tape that have data created by other backup tool , I don't what to use tar to backup but do not overwrite the existing data , I tried -r , -A , ( tar -zcvf -A device file ) and ( tar -zcvf -r device file ) , I found that the existing files are not overwrited but the new files do not write to it , can advise what is wrong ? thx
 
  


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
inserting data into an existing file Magius363 Linux - Newbie 2 03-12-2008 07:10 PM
remove directory info from tar file splunk Linux - Software 2 08-22-2007 03:24 PM
gave wrong syntax for tar as tar -cvzf file file.tgz how to recover the file gautham Linux - General 4 04-13-2005 03:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:43 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