LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 10-28-2003, 02:54 PM   #1
JTD
LQ Newbie
 
Registered: May 2003
Location: B.C
Distribution: Libranet
Posts: 10

Rep: Reputation: 0
Tar syntax


Hi,
I have read the manual but still cannot seem to get the syntax correct to do the following.
I want to backup /home using TAR and EXCLUDE all references to 'cache' or any web like cookies, history etc...
I can sucessfully run tar but my /home seems to bloat to ~2GB and thus cannot write to a CDR.
In that vain, how can I get TAR to split up this ~2GB file into 3 or 4 separate tar files while it is archiving it in the first. If I use SPLIT then I run out of disk space on my distribution drive.

Thanks in advance,

JTD
 
Old 10-28-2003, 03:14 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Tar, for all I know, will only allow multi-volume
backups to tape. You can look for star on
fresheat.net (it's from Schilling, the maker of
the cdr-tools).

As for the exclusion: you can't use wildcards,
if you need to exclude lots of stuff do something
like:
Code:
find /home/ -iname "*cache*" > /tmp/not_these.txt
find /home/ -iname "*other_stuff_I_don't_want*" >> /tmp/not_these.txt
tar -X /tmp/not_these.txt -cvzf /tmp/home.tar.gz /home
Cheers,
Tink
 
Old 10-28-2003, 04:28 PM   #3
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,173

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
It might be easier to add the files you want to the tar file.
tar -czvf backup.tgz documents/ stuff/ more_stuff/ porn/ downloads/ windows/
for more compression use bzip2, tar -cjvf backup.tar.bz2 /stuff more_stuff/ ...
 
  


Reply



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
tar tar cvf - . | (cd /root/; tar xvf -) ewt3y Linux - General 10 02-19-2014 10:55 AM
Tar for backups ? Proper syntax ? Reefcrazed Linux - Newbie 8 02-21-2006 05:18 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
Tar syntax to backup system... robbow52 Debian 5 08-05-2004 11:35 AM

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

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