Is Rsync like subversion, but for a server?

I'm trying to learn how to use rsync. I want to create daily backs up of my production server.

Right now I run the command

rsync -azr /var/www/* [email protected]:/var/www

Now let's say one day, I want to roll back the /var/www/ directory on my production server to last month's version. How do I tell rsync to retrieve version N?

On reading that rsync only copies differences between src and dest, I assumed rsync works like subversion where you commit changes to a destination, and keep track of every version, and with the option to checkout any version at anytime. Is that the way rsync works? It's like subversion but for an entire server? That would be great because then it means I don't have to do full ssh copies for my nightly backups.


rsync mirrors your current filestructure to the other side. It sends only the differences in the files, but does not keep revisions.

http://blog.interlinked.org/tutorials/rsync_time_machine.html

might be closer to what you want to do. For a less 'manual' method, http://rsnapshot.org/


rsync is not a version control system. It operates on the bare filesystem objects and add, updates, and deletes them directly as necessary. Other tools may add some sort of versioning, but there is no way to rollback using bare rsync.