LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 07:02 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 30
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, 09:34 AM   #2
ozminh
Member
 
Registered: Aug 2007
Posts: 73

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

Rep: Reputation: 442Reputation: 442Reputation: 442Reputation: 442Reputation: 442
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, 02:55 AM   #4
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 30
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 03:48 AM
inserting data into an existing file Magius363 Linux - Newbie 2 03-12-2008 08:10 PM
remove directory info from tar file splunk Linux - Software 2 08-22-2007 04: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 04:15 AM


All times are GMT -5. The time now is 03:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration