ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bates" <david.ba...@triggersoft.com>
Subject Multiple directories
Date Thu, 08 Jun 2006 08:02:13 GMT
I have the following target:

 

  <target name="backup" description="Backup existing application">

    <tstamp>

      <format property="deployment.start" pattern="yyyy-MM-dd_HHmm"/>

    </tstamp>

 

    <zip destfile="${backup.dir}/${deployment.start}.zip">

      <zipfileset dir="${backup.frontend.dir}" prefix="Frontend Files"/>

      <zipfileset dir="${backup.backend.dir}" prefix="Backend Files"/> 

    </zip>

  </target>

 

I run this prior to doing a deployment to ensure we have a backup of
what was on the server in case everything goes wrong.

 

The property "backup.backend.dir" comes from a property file.  The
problem is that I use this script on several different servers and on
some servers several directories need to be backed up.  For example, on
our Live server I need to backup servers/MyApp.  However, on our User
Acceptance Testing server we have several instances of the application
and all these need to be backed up: servers/MyApp1, servers/MyApp2,
servers/MyApp3.

 

Is there a neat way of doing this?

 

  e.g. backup.backend.dir=servers/MyApp1:servers/MyApp2:servers/MyApp3

  or backup.backend.dir=servers/MyApp*

 

Cheers again,

 

David.

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message