Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Backing up linux shell script. error from tar also
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
lowbatt
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2002
Posts: 83

PostPosted: Sun Aug 04, 2002 12:21 am    Post subject: Backing up linux shell script. error from tar also Reply with quote

I'm trying to make a shelld script that would backup my /home /var /usr dir's to a tar file. I tried this simple command tar -cZf /root/backup/backup.tgz /home/ and i get this error

tar: Removing leading `/' from member names
tar (child): compress: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
Broken pipe

any idea on what do here? Also anyone already have a good script i could use to do this ?
_________________
Information is pure. Take a knife, for example. You can use it to cut up vegetables, butter your bread, etc. Or you can use it as a weapon. The way in which information exists in its many forms leaves for us the decision how to use it. - Maynard -TOOL
Back to top
View user's profile Send private message
nitro322
Guru
Guru


Joined: 24 Jul 2002
Posts: 593
Location: USA

PostPosted: Sun Aug 04, 2002 12:30 am    Post subject: Reply with quote

Code:
tar jcf /usr/local/backup/backup.tbz2 /home

worked fine to me. I still got the error about removing the leading '/', but everything was backed up. Maybe compress just can't handle what you're trying to do. Try archiving it with either gzip (-z) or bzip2 (-j) instead (better compression anyway.
Back to top
View user's profile Send private message
lowbatt
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2002
Posts: 83

PostPosted: Sun Aug 04, 2002 12:39 am    Post subject: Reply with quote

nitro322 wrote:
Code:
tar jcf /usr/local/backup/backup.tbz2 /home

worked fine to me. I still got the error about removing the leading '/', but everything was backed up. Maybe compress just can't handle what you're trying to do. Try archiving it with either gzip (-z) or bzip2 (-j) instead (better compression anyway.
\

Thanks! that worked for me it must have jsut been with the compress I was tryign to use. now what is better compression gzip or bzip2?
_________________
Information is pure. Take a knife, for example. You can use it to cut up vegetables, butter your bread, etc. Or you can use it as a weapon. The way in which information exists in its many forms leaves for us the decision how to use it. - Maynard -TOOL
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Sun Aug 04, 2002 1:16 am    Post subject: Reply with quote

For tar:
Z = compress (Unix compress program that has potential patent encumberances)
z = gzip
j = bzip2

You don't have compress installed. bzip2 should generally give you better compression that gzip.
Back to top
View user's profile Send private message
lowbatt
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2002
Posts: 83

PostPosted: Sun Aug 04, 2002 2:26 am    Post subject: Reply with quote

Naan Yaar wrote:
For tar:
Z = compress (Unix compress program that has potential patent encumberances)
z = gzip
j = bzip2

You don't have compress installed. bzip2 should generally give you better compression that gzip.


I was thinking along those lines from the error msg but you never know. So I used gzip :) next time ill try bzip2
_________________
Information is pure. Take a knife, for example. You can use it to cut up vegetables, butter your bread, etc. Or you can use it as a weapon. The way in which information exists in its many forms leaves for us the decision how to use it. - Maynard -TOOL
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum