Create tar archive of a directory:

tar -cvzf archive.tgz directory

Create tar archive of files:

tar -cvzf archive.tgz file1 file2 file3

To unpack it:

tar xvzf backup.tgz