views:

153

answers:

3

I am a Mac/Ubuntu user. I have folders such as "AWK", "awk", "awk_tip" and "awk_notes". I need to archive them, but the variety of utilities confuse me. I had a look at Tar, cpio and pax, but Git has started to fascinate me. I occasionally need encryption and backups.

Please, list the pros and cons of different archiving utilities.

+1  A: 

Under what OS / toolchain are you working? This might limit the range of existing solutions. Your name suggests Unix, but which one? Further, do you need portability or not?

The standard linux solution (at least to a newbie like me) might be to tar and gzip or bzip2 the folders, then encrypt them with gnupg if you really have to (encrypting awk tutorials seems a bit of overkill to me). You can also use full-fledged backup solutions like bacula, sync to a different location with rsync (perhaps sync to a backup server?).

Adriano Varoli Piazza
+4  A: 

Tar, cpio and pax are ancient Unix utilities. For instance, tar (which is probably the most common of these) was originally intended for making backups on tapes (hence the name, tar = tape archive).

The most commonly used archive formats today are:

  • tar (in Unix/Linux environments)
  • tar.gz or tgz (a gzip compressed tar file)
  • zip (in Windows environments)

If you want just one simple tool, take zip. It works right out of the box on most platforms, and it can be password protected (although the protection is technically weak).

If you need stronger protection (encryption), check out TrueCrypt. It is very good.

Joonas Pulakka
A: 

If you've backing up directories from an ext2/ext3 filesystem, you may want to consider using dump. Some nice features:

  • it can backup a directory or a whole partition
  • it saves permissions and timestamps,
  • it allows you to do incremental backups,
  • it can compress (gzip or bzip2)
  • it will automatically split the archive into multiple parts based on a size-limit if you want
  • it will backup over a network or to a tape as well as a file

It doesn't support encryption, but you can always encrypt the dump files afterwards.