LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-28-2014, 09:19 AM   #1
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Rep: Reputation: Disabled
tar vs backup program


I am wondering which would do a better job (or if it matters) of compressing files - tar or using the program for my backups, easeus todo backup?
 
Old 07-28-2014, 09:25 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,173

Rep: Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272
Define "better"
 
Old 07-28-2014, 09:29 AM   #3
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Original Poster
Rep: Reputation: Disabled
Hm, not entirely sure. I've always thought nothing beats a Linux program or tool, and I've considered just using linux for the compression. which would you use? would you rely on the program to do compression for you, or use linux? not sure if one is able to compress the content more than another?
 
Old 07-28-2014, 09:36 AM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,347

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
Quote:
Originally Posted by sniper8752 View Post
not sure if one is able to compress the content more than another?
You could run a test. Try compressing a group of files both ways and see which way produces the smaller backup file.

----------------------
Steve Stites
 
1 members found this post helpful.
Old 07-28-2014, 09:50 AM   #5
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Tar doesn't compress files. It is just a "Tape archiver."

You can use gzip, xz or bzip2 with tar though, through tar parameters. If you are talking about how small an archive can be made with compression then the typical order is:

From best compression to lowest compression
  • xz
  • bzip2
  • gzip

But remember, there is a nearly catastrophic amount of time to compress things to their limit. using xz on a multi-GB file can take many many hours.

Last edited by szboardstretcher; 07-28-2014 at 09:53 AM.
 
Old 07-28-2014, 10:12 AM   #6
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by szboardstretcher View Post
Tar doesn't compress files. It is just a "Tape archiver."

You can use gzip, xz or bzip2 with tar though, through tar parameters. If you are talking about how small an archive can be made with compression then the typical order is:

From best compression to lowest compression
  • xz
  • bzip2
  • gzip

But remember, there is a nearly catastrophic amount of time to compress things to their limit. using xz on a multi-GB file can take many many hours.
would gzip be recommended for personal use? I don't want something that takes forever to compress. and I never heard of xz.
 
Old 07-28-2014, 10:15 AM   #7
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Gzip is the one i use most. Just call it out in your tar command as:

Code:
tar czvf filename.tar.gz /your/path/to/compress
  • c - compress
  • z - call gzip
  • v - verbose
  • f - to file: filename.tar.gz
 
Old 07-28-2014, 02:24 PM   #8
David.V
LQ Newbie
 
Registered: Jul 2014
Location: USA
Distribution: Mint 17
Posts: 15

Rep: Reputation: Disabled
@ sniper8752

Have you tried rar in linux. It has many options that you can view by typing
rar --help | less

It also does compressions. For example

Code:
rar a -m0 mybackup.rar /path/to/files
a = includes all files and subfolders and permissions settings, etc
-m0 = zero compression
-m3 = default compression
-m5 = maximum compression

You can also add a data recovery record in case the rar archive becomes corrupted.
Code:
rar a -m0 -rr10 mybackup.rar /path/to/files
If the archive becomes 10% corrupted, the files can still be recovered through parity.


If you want to encrypt the archive and add a password add the -hp switch
Code:
rar a -m0 -hp mybackup.rar /path/to/files
You will be prompted to enter a password

To Extract the RAR archive is as simple as
Code:
rar e mybackup.rar 

Or

rar x mybackup.rar
e = Extract files without archived paths
x = Extract files with full path

**Note: if the archive is password protected, you will be prompted for it

Last edited by David.V; 07-28-2014 at 02:33 PM.
 
Old 07-28-2014, 02:44 PM   #9
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
'tar' and 'gzip' are included in nearly every distro by default though. Just an fyi.
 
Old 07-28-2014, 03:19 PM   #10
David.V
LQ Newbie
 
Registered: Jul 2014
Location: USA
Distribution: Mint 17
Posts: 15

Rep: Reputation: Disabled
Quote:
Originally Posted by szboardstretcher View Post
'tar' and 'gzip' are included in nearly every distro by default though. Just an fyi.
True, but the OP can install rar if he/she wants to. I was just making a suggestion.
 
Old 07-28-2014, 03:34 PM   #11
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Original Poster
Rep: Reputation: Disabled
Thanks, I'll try these out!
 
Old 07-28-2014, 03:46 PM   #12
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by David.V View Post
@ sniper8752

You can also add a data recovery record in case the rar archive becomes corrupted.
Is this common to do? How much longer does it take, if so?
 
Old 07-28-2014, 03:55 PM   #13
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
In the world of downloading and sharing files through newsgroups or torrents, using recovery records or parity archives is a common thing because data loss is likely. Also, in some high importance data storage situations Parity Archives are used, especially for Hard Copy/Offsite Backups.

For day to day backups, multiple backup locations and media along with MD5/CRC check files are usually sufficient. A tar+gzip can get you a backup fairly quickly that is recognized by most people/systems/programs in the Linux world that is easy to check, restore and push off to multiple backup locations for redundancy.

Rar is also closed source and proprietary, and is not "Free Software." Tar and Gzip are GPL licensed and are "Free Software." If that kind of thing matters to you.
 
Old 07-28-2014, 04:21 PM   #14
David.V
LQ Newbie
 
Registered: Jul 2014
Location: USA
Distribution: Mint 17
Posts: 15

Rep: Reputation: Disabled
Quote:
Originally Posted by sniper8752 View Post
Is this common to do? How much longer does it take, if so?
it's optional. I rarely use it. The process can be fast or slow depending on compression level i.e m3 or m5, the total size of the directory and/or file(s) and the recovery percentage used. The 10 in -rr10 can be a higher or lower number.

I use tar and rar where it is suited for me, but I use rsync a bit more than the others.

There are many archivers to use in linux both free and non-free, it's a matter of preference or choice. And it's OK to use them all if you want to.


Last edited by David.V; 07-28-2014 at 04:23 PM.
 
  


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
tar the last periodic backup that is in another path and move the tar to some dir nelovicov Linux - Newbie 6 01-20-2012 09:40 AM
[HOW TO] Install Program from Source-tar.gz/tar.bz kratosal Linux - Newbie 5 04-04-2008 03:59 PM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
Cannot take tar backup nevillemonteiro Linux - Enterprise 1 08-25-2006 03:21 AM
Tar backup TheRealDeal Linux - General 7 02-08-2005 03:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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