good zip/7zip/cab/blackhole program for linux?

Computer builds, hardware and software discussion or troubleshooting, including peripherals. Essentially a general place to talk about desktop computers.
Locked
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

good zip/7zip/cab/blackhole program for linux?

Post by Red Squirrel »

I want to be able to archive stuff through the command line, mostly in automated scripts that backup stuff. I tried to use tar, but it actually makes the files like 5 times bigger, and half the time they corrupt. So I want to use something more reliable such as zip, 7zip, cab, bh etc... Is there a command, or a program I can get that will let me do this?

Archived topic from Anythingforums, old topic ID:1270, old post ID:16218
Honk if you love Jesus, text if you want to meet Him!
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

good zip/7zip/cab/blackhole program for linux?

Post by Red Squirrel »

turns out I was looking at the wrong folder when I said 500MB, the original was actually 4GB and the tar was 4GB. But still, it would be nice to compress using al algorthm that is better on text. BH could get that 4GB folder in about 500MB probably. it's mostly all text. (html, php etc)

Archived topic from Anythingforums, old topic ID:1270, old post ID:16235
Honk if you love Jesus, text if you want to meet Him!
sintekk
Posts: 4994
Joined: Mon Feb 16, 2004 10:38 pm

good zip/7zip/cab/blackhole program for linux?

Post by sintekk »

Red Squirrel wrote: I want to be able to archive stuff through the command line, mostly in automated scripts that backup stuff.  I tried to use tar, but it actually makes the files like 5 times bigger, and half the time they corrupt.  So I want to use something more reliable such as zip, 7zip, cab, bh etc...  Is there a command, or a program I can get that will let me do this?
http://www.flexbeta.net/main/articles.php?...&showarticle=27

Archived topic from Anythingforums, old topic ID:1270, old post ID:16240
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

good zip/7zip/cab/blackhole program for linux?

Post by Red Squirrel »

I'm hoping for something standard though, such as zip, 7zip etc so I can open it in windows too.

Archived topic from Anythingforums, old topic ID:1270, old post ID:16314
Honk if you love Jesus, text if you want to meet Him!
megaspaz
Posts: 340
Joined: Wed Dec 18, 2002 10:08 pm

good zip/7zip/cab/blackhole program for linux?

Post by megaspaz »

are you using the gzip option in tar? using tar without either the -z or -j option won't compress the archive. i don't know what command you're using but i've never had a corrupt gzipped tar archive. you may want to try bzip2 if gzip isn't compressing enough for you. it's the -j option in tar. also look into either man gzip or man bzip2 as there are options to use more agressive compression for both.

Archived topic from Anythingforums, old topic ID:1270, old post ID:16317
Image
Resistance is futile...

Registered Linux User #321628
Anime/Toon Avatars
Other Cool Forums

"Never hold your farts in. They travel up your spine, into your brain, and that's where you get s**tty ideas from..." - Woyaya - January 10, 2004
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

good zip/7zip/cab/blackhole program for linux?

Post by Red Squirrel »

Oh I figured it did it by default, anyway I checked the help file and tried a few commands to no avail.

tar -cZ /data2/backups/server_older.tar.gz /data2/backups/server/

I also tried

tar -cj /data2/backups/server_older.tar.gz /data2/backups/server/

But it just says "cannot stat" then it spits out a bunch of binary data.

Archived topic from Anythingforums, old topic ID:1270, old post ID:16321
Honk if you love Jesus, text if you want to meet Him!
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

good zip/7zip/cab/blackhole program for linux?

Post by Red Squirrel »

I think I found a bug in the tar command, a huge buffer overflow at that.

Code: Select all

[root@localhost root]# tar -c /data2/backups/test.tar.gz /data2/backups/server 
tar: /data2/backups/test.tar.gz: Cannot stat: No such file or directory
tar: Removing leading `/' from member names
data2/backups/server/0040755000000000000000000000000010143500435013504 5ustar  rootrootdata2/backups/server/databases/0040755000000000000000000000000010143501774015442 5ustar  rootrootdata2/backups/server/databases/mysql.sql0100644000000000000000044504000010143502154017325 0ustar  rootroot-- MySQL dump 9.10
--
-- Host: localhost    Database: 
-- ------------------------------------------------------
-- Server version       4.0.18

--
-- Current Database: business
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ business;

There's no way this is normal. First off:

tar: /data2/backups/test.tar.gz: Cannot stat: No such file or directory

Obviously there's no file, the whole point of the command is to CREATE it.

And if it errors out, why does it start spitting out the data?

and this part is really weird.


data2/backups/server/0040755000000000000000000000000010143500435013504 5ustar rootrootdata2/backups/server/databases/0040755000000000000000000000000010143501774015442 5ustar rootrootdata2/backups/server/databases/mysql.sql0100644000000000000000044504000010143502154017325 0ustar rootroot-- MySQL dump 9.10


Archived topic from Anythingforums, old topic ID:1270, old post ID:16331
Honk if you love Jesus, text if you want to meet Him!
User avatar
MadGhigno
Posts: 37
Joined: Tue Aug 03, 2004 5:13 pm

good zip/7zip/cab/blackhole program for linux?

Post by MadGhigno »

if you want to compress the archive use:

Code: Select all

tar -cvzf  /<the dir you want to archive>
to explode the archive:

Code: Select all

tar -xvzf <archive_name.tgz>
bye
MadGhigno

Archived topic from Anythingforums, old topic ID:1270, old post ID:16372
signature for rent
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

good zip/7zip/cab/blackhole program for linux?

Post by Red Squirrel »

Thanks looks like I got it working, the f parameter has to be last.

Archived topic from Anythingforums, old topic ID:1270, old post ID:16392
Honk if you love Jesus, text if you want to meet Him!
Locked