Deploy plugin. Upload only files that have been modified

Hello there,

I was wondering whether somebody is using the deploy plugin, and how you managed the deployment of those resources which have not changed.

So far the plugin sends everything all the time, but the more the site become bigger the longer the time it will take. Any workaround here?

Thanks

Hey @andrea_moro, you’re probably using the sftp setting, try updating it to use the rsync setting.

To confirm dikaio’s advice – I’m using the deploy plugin only with hostings that support rsync, which not only sends modified files only, but also is just plain faster than FTP. On hosting accounts that do not support rsyncs (there are many in my country), unfortunately it’s better for me to use normal FTP app or FTP functionality of editor/IDE of choice.

Thanks to both of you guys. I will ping my hosting provider asking whether Rsync is available.

Any way for me to find this out?
Looking at the configuration settings, I can’t see any password item in the example.
Does Rsync require it? Would the inclusion of a deploy.password be enough? Or the password is not meant to be used?

Thanks

Rsync is using a ssh channel of communication with a hosting, so I think it’s mandatory to have ssh functionality on hosting. And ssh uses passwords of course. It’s a part of config.rb snippet for middleman-deploy plugin:

# Deployment with 'middleman-deploy'
# usage: 
# $ rake deploy:test
# $ rake deploy:production

case ENV['TARGET'].to_s.downcase
when 'production'
  activate :deploy do |deploy|
		# deploy.build_before = true # default: false
		deploy.method	= :rsync
		deploy.host		= "####"
		deploy.port		= 2222
		deploy.clean  = true  # remove orphaned files on remote host, default: false
		deploy.flags  = "-avz --exclude=.DS_Store"
		deploy.path		= "####/"
		deploy.user		= Bundler.settings["az_user"]
		deploy.password = Bundler.settings["az_pass"]
  end
else
  activate :deploy do |deploy|
…
  end
end

Thanks for this. Apparently my provider supports rSync but not the SSH certificate, hence all the time I have to provide the password to connect.
Sounds strange, but that’s what happened despite having authorized the connection. Not sure there is something wrong though.

Have you tried to generate a ssh-key? I’m not expert on this, but it is my understanding, that it doen’t need any support from the provider (except for ssh to work). You can generate it for yourself. I remember it was a pain but I googled how to do it, with success. Try searching for “ssh id_dsa” or similar phrase.