I've created simple Ant script for backup purposes. This script creates archive with unique (time depended) name.
E.g.: If project (project's folder) has name "Eclipsoid", it will be packed to "Eclipsoid-2007.07.19_11.52.00.tar.bz2" archived file.
You may insert "ubackup" target into your project's build.xml file or use this script standalone.
build.xml
<project default="ubackup" basedir=".">
<target name="ubackup">
<tstamp>
<format property="backuptime" pattern="yyyy.MM.dd_HH.mm.ss"/>
</tstamp>
<basename property="currentdir" file="."/>
<property name="backupfilename" value="${currentdir}-${backuptime}"/>
<tar destfile="../${backupfilename}.tar.bz2" compression="bzip2" basedir="../${currentdir}"/>
</target>
</project>
No comments:
Post a Comment