Archiving using rar in Debian / Ubuntu / Linux. archiver rar

Rar archiver with Linux. Archiving using rar in Debian / Ubuntu / Linux.

Rar
If the archiver is not installed, install:
# Apt-get install rar

Zaarhiviruem all files and folders in the directory / var / log / or directories / var / spool /:
# Rar a -r -m5 test-archive.rar / var / log / * / var / spool / *

-a – add the data (add)
-m5 – compression ratio of 0 to 5. 0 – no compression.
test-archive.zip – name of the archive
/ Var / log / * / var / spool / * – archived directory through the gap
-r – an option that adds information to restore
-hp Option allows you to specify the password for the archive

How to unpack rar file in Linux?
# Rar e test-archive.rar – unzip the file in the current directory

How to check the rar file in Linux?
# Rar t test-archive.rar

How to recover rar file in Linux?
# Rar r test-archive.rar