Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3608108
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:27:38+00:00 2026-05-18T21:27:38+00:00

I would like to optimize my scp deployment which currently copies all files to

  • 0

I would like to optimize my scp deployment which currently copies all files to only copy files that have changed since the last build. I believe it should be possible with the current setup somehow, but I don’t know how to do this.

I have the following:

Project/src/blah/blah/ <—- files I am editing (mostly PHP in this case, some static assets)

Project/build <——- I have a local build step that I use to copy the files to here

I have an scp task right now that copies all of Project/build out to a remote server when I need it.

Is it possible to somehow take advantage of this extra “build” directory to accomplish what I want — meaning I only want to upload the “diff” between src/** and build/**. Is it possible to somehow retrieve this as a fileset in ANT and then scp that?

I do realize that what it means is that if I somehow delete/mess around with files on the server in between, the ANT script would not notice, but for me this is okay.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:27:38+00:00Added an answer on May 18, 2026 at 9:27 pm

    You can tell ant scp to only copy files which have been modified since the last push using the modified tag like so:

    <scp trust="true" sftp="true"... >
      <fileset dir="${local.dir}">
        <modified>
          <param name="cache.cachefile" value="localdev.cache"/>
        </modified>
      </fileset>
    </scp>
    

    The first time you use this, it will send all files and cache the timestamps in the cachefile declared in the param. After that, it will only send the modified ones.

    Tested and verified in sftp mode.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an set numeric ranges that I would like to optimize. Here's a
I have many complex SQL queries that I would like to optimize. The performance
I have a SELECT statement which I would like to optimize. The mysql -
I have built an application in C# that I would like to be optimized
I have a structure I would like to optimize the footprint of. typedef struct
I'm developing a Rails 3 app deployed on Heroku which would like to optimize.
I would like to optimize the following method, that returns the total file count
I have my code and I would like to optimize it. For me it
I've got some code which i would like to optimize. First, not bad at
I would like to optimize my query, I'm currently sub-querying a table loaded with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.