➥ Rsync - autoincrement архив

Това е най-простия синтаксис  за архивиране от този тип.
rsync -uaq /var/www  /media/storage


Ако искате двете папки да са синхронизирани т.е ако от едната изтриете нещо то и в другата да го няма командата е:
rsync -rtvu --delete /mnt/Storage1/ /mnt/Storage2/


Copy incremental and autodelete archive with no password with generated ssh keys
ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub 10.20.6.30
rsync -rtvu --delete /var/www/html root@10.20.6.30:/var/www/



IF YOU HAVE A PROBLEM WITH THE SSH KEYS:
Enter pass phrase for /root/.ssh/id_rsa:

the solution is:

rm -rf /root/.ssh/*.*
ssh-keygen
chmod 600 /root/.ssh/id_rsa
openssl rsa -in ~/.ssh/id_rsa -out ~/.ssh/id_rsa_new
cp ~/.ssh/id_rsa ~/.ssh/id_rsa.backup
rm ~/.ssh/id_rsa
cp ~/.ssh/id_rsa_new ~/.ssh/id_rsa
chmod 400 ~/.ssh/id_rsa