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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-28-2014, 09:19 AM
|
#1
|
Member
Registered: Oct 2012
Posts: 567
Rep: 
|
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?
|
|
|
07-28-2014, 09:25 AM
|
#2
|
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,314
|
Define "better"
|
|
|
07-28-2014, 09:29 AM
|
#3
|
Member
Registered: Oct 2012
Posts: 567
Original Poster
Rep: 
|
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?
|
|
|
07-28-2014, 09:36 AM
|
#4
|
LQ Guru
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,385
|
Quote:
Originally Posted by sniper8752
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.
|
07-28-2014, 09:50 AM
|
#5
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
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
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.
|
|
|
07-28-2014, 10:12 AM
|
#6
|
Member
Registered: Oct 2012
Posts: 567
Original Poster
Rep: 
|
Quote:
Originally Posted by szboardstretcher
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
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.
|
|
|
07-28-2014, 10:15 AM
|
#7
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
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
|
|
|
07-28-2014, 02:24 PM
|
#8
|
LQ Newbie
Registered: Jul 2014
Location: USA
Distribution: Mint 17
Posts: 15
Rep: 
|
@ 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.
|
|
|
07-28-2014, 02:44 PM
|
#9
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
'tar' and 'gzip' are included in nearly every distro by default though. Just an fyi.
|
|
|
07-28-2014, 03:19 PM
|
#10
|
LQ Newbie
Registered: Jul 2014
Location: USA
Distribution: Mint 17
Posts: 15
Rep: 
|
Quote:
Originally Posted by szboardstretcher
'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.
|
|
|
07-28-2014, 03:34 PM
|
#11
|
Member
Registered: Oct 2012
Posts: 567
Original Poster
Rep: 
|
Thanks, I'll try these out!
|
|
|
07-28-2014, 03:46 PM
|
#12
|
Member
Registered: Oct 2012
Posts: 567
Original Poster
Rep: 
|
Quote:
Originally Posted by David.V
@ 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?
|
|
|
07-28-2014, 03:55 PM
|
#13
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
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.
|
|
|
07-28-2014, 04:21 PM
|
#14
|
LQ Newbie
Registered: Jul 2014
Location: USA
Distribution: Mint 17
Posts: 15
Rep: 
|
Quote:
Originally Posted by sniper8752
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.
|
|
|
All times are GMT -5. The time now is 04:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|