Page 1 of 1
good zip/7zip/cab/blackhole program for linux?
Posted: Fri Nov 05, 2004 7:43 pm
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
good zip/7zip/cab/blackhole program for linux?
Posted: Fri Nov 05, 2004 11:54 pm
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
good zip/7zip/cab/blackhole program for linux?
Posted: Sat Nov 06, 2004 12:11 am
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
good zip/7zip/cab/blackhole program for linux?
Posted: Sun Nov 07, 2004 1:15 pm
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
good zip/7zip/cab/blackhole program for linux?
Posted: Sun Nov 07, 2004 2:26 pm
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
good zip/7zip/cab/blackhole program for linux?
Posted: Sun Nov 07, 2004 4:44 pm
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
good zip/7zip/cab/blackhole program for linux?
Posted: Sun Nov 07, 2004 7:18 pm
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
good zip/7zip/cab/blackhole program for linux?
Posted: Mon Nov 08, 2004 5:12 am
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:
bye
MadGhigno
Archived topic from Anythingforums, old topic ID:1270, old post ID:16372
good zip/7zip/cab/blackhole program for linux?
Posted: Mon Nov 08, 2004 5:58 pm
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