David Parks
David Parks

Reputation: 32081

Using ANT to deploy from windows to unix (efficiently)

I want to automate copying files from a dev environment to a unix server.

When using ANT's SCP task, how does it handle synchronizing the directories?

I would like to ensure that:

  1. Files that are no longer in my source are removed from the destination server
  2. Files that didn't change should not be copied (it would take forever to fully sync every jar file every time).

Upvotes: 0

Views: 246

Answers (1)

Aaron Digulla
Aaron Digulla

Reputation: 328624

scp is the wrong tool for the task. Try rsync instead. --delete will delete stuff that's no longer on the source side. Unmodified files are not copied; in fact, rsync will only copy those parts of existing files that did change (so it's even faster for partially modified files like log files which have been appended to).

Upvotes: 1

Related Questions