Install RAR latest version in Linux

VERSION=5.9.0
wget https://www.rarlab.com/rar/rarlinux-x64-${VERSION}.tar.gz
tar -xf rarlinux-x64-${VERSION}.tar.gz
rm rarlinux-x64-${VERSION}.tar.gz
cd rar

chmod +x rar unrar
sudo mv rar unrar /usr/bin
sudo mv rarfiles.lst /etc

wget -O rarreg.key https://pastebin.com/raw/Ed7iQSPm
sudo mv default.sfx rarreg.key /usr/local/lib

cd ..
rm -r rar
exec bash

Online Manual

https://pastebin.com/raw/p9ebbGAb

Examples

# WordPress files backup
rar a -idq -s -r -ep1 -x"*wp-content/cache/*" mywordpress.rar "/path/to/mywordpress/"

# Dump a database and compress on the fly.
# mysqldump prints to STDOUT
# RAR {-si} flag reads from STDIN
mysqldump -u {root} -p{password} {mydatabase} --single-transaction --skip-lock-tables --quick | rar a -idq -si{mydatabase.sql} {mydatabase.rar}

# Uncompress and restore.
# mysql reads from STDIN
# {p} prints file to STDOUT
# {-inul} disable all RAR messages (important)
rar p -inul {mydatabase.rar} | mysql -u {root} -p{password} {mydatabase}