Should have approximately the functionality of my rsync-based script, except that it doesn't clean up yet.
Relative paths are wrong, and permissions are missing. Database support is missing.