Updating ownCloud con rsync

Update
Updating means updating ownCloud to the latest point release, e.g. ownCloud 4.0.6 → 4.0.7. To update an ownCloud installation manually, follow those steps:
If you have installed ownCloud from a repository, your package management should take care of it.

  1. Make a backup.
  2. Unpack the release tarball in the owncloud directory, i.e. copy all new files into the ownCloud installation.
  3. Make sure that the file permissions are correct.
  4. After the next page request the update procedures will run.

Assuming your ownCloud installation is at ./owncloud/ and you want to update to the latest version, you could do the following:
Use rsync in archive mode (this leaves file owner, permissions, and time stamps untouched) to recursively copy all content from ./owncloud/ to a backup directory which contains the current date:

/[/crayon]

Download the latest version to the working directory:

Extract content of archive to ./owncloud_latest/:

Use rsync to recursivly copy extracted files (new) to ownCloud installation (old) using modification times of the new files, but preserving owner and permissions of the old files:
You should not use this [–inplace] option to update files that are being accessed by others (from rysnc man page)

Clean up: