I have a code base on my production server which is synced from a remote directory. One thing I want to improve about the rsync process is to make it make a local copy first before it takes place and over write the original files. Something like
before syncing files from remote : cp -rf production_code_base production_code_base_old now syncing remote changes to the production directory
Is there a way to do that?