rsync: backup directory locally before syncing from remote I'm using rsync for code deployment. In case there is something going wrong with the new code. I need to backup the previous code first. The code is actually version controlled by the GIT tool. But we don't want to put the .git/ stuff to production along with the real code.