# File lib/hydra/sync.rb, line 42
    def sync
      #trace "Synchronizing with #{connect}\n\t#{sync_opts.inspect}"
      exclude_opts = @exclude_paths.inject(''){|memo, path| memo += "--exclude=#{path} "}

      rsync_command = [
        'rsync',
        '-avz',
        '--delete',
        exclude_opts,
        File.expand_path(@local_dir)+'/',
        "-e \"ssh #{@ssh_opts}\"",
        "#{@connect}:#{@remote_dir}"
      ].join(" ")
      trace rsync_command
      trace `#{rsync_command}`
    end