jedrichards/grunt-rsync

no uploading all files even if they have not changed?

Closed this issue · 4 comments

v3nt commented

I've been using this for a few years on several sites with great success but now on all of them it doesn't just upload the changed files but uploads them everything. Is there a setting or parameter change and can i get it to just upload the changed files again? Thanks!

Shell command was: rsync . YYY@XXX:/var/www/vhosts/mmm.com/site1/wp-content/themes/aba-master --rsh "ssh -p 2020" --recursive --delete --exclude=.git* --exclude=*.scss --exclude=*.less --exclude=node_modules --exclude=bower_components --verbose

Huh, that's odd. Is there anything in the rsyncwrapper changelog that looks like it might have changed and caused this? There's nothing that springs to mind.

https://github.com/jedrichards/rsyncwrapper

And if you try using an older version grunt-rsync do you get the same issue? Maybe your local version of rsync changed, and make it behave differently? Or something going on on your servers?

You could try some non-default values for compareMode too, see if that helps?

https://github.com/jedrichards/rsyncwrapper#comparemode-string-enum-checksumsizeonly

v3nt commented

Hey jed,
started with
rsync version 2.6.9 protocol version 29

just updated to
rsync version 3.1.2 protocol version 31

and ran
rsync . wankhemleach@94.229.171.80:/var/www/vhosts/wonkhe.com/httpdocs/wp-content/themes/wonkhe-roots-master --rsh "ssh -p 2020" --recursive --delete --exclude=.git* --exclude=*.scss --exclude=*.less --exclude=node_modules --verbose

still uploads all files even if they haven't been edited. This is happening on 2 different machines.

If i add --update -raz --progress it works fine so something odd with the way the rsync command is being formed?

This works, ie only upload new file and edited file.
rsync --update -raz --progress . wankhemleach@94.229.171.80:/var/www/vhosts/wonkhe.com/httpdocs/wp-content/themes/wonkhe-roots-master --rsh "ssh -p 2020" --recursive --delete --exclude=.git* --exclude=*.scss --exclude=*.less --exclude=node_modules --verbose

v3nt commented

ok - so using these args fixes it but i've never had to use them before... Maybe the default command structure has changed?

options: {
      args: ["--update -raz --progress --verbose "],

Ah so you're running commands outside of grunt-rsync on the cli and still seeing the issue unless you add the --update -raz --progress --verbose args? That's odd if so ...