Please help for the following problem:
(my purpose is to simplify the deployment with apache-ant)
1. Stop Tomcat 6.x
2. a) Create a new war_backup folder in any disk and create a new 01.07.2009 (must be change every day) folder in war_backup folder (as G:/war_backup/01.07.2009)
b) Further copy rizvan.war (Tomcat user -> apache-tomcat/webapps/rizvan.war) to this new 01.07.2009 folder.
3. Also copy logs folder (apache-tomcat/logs) to this new 01.07.2009 folder.
4. Then delete old rizavn.war (apache-tomcat/webapps/rizvan.war) and rizvan folder (apache-tomcat/webapps/rizvan)
5. Also delete files in old logs folder (apache-tomcat/logs)
6. Also delete files in work folder (apache-tomcat/work)
7. Then copy new rizvan.war from the disk (G:/) to the apache-tomcat/webapps/
8. And at last start Tomcat
Most of your task could be done with ANT Core Tasks http://ant.apache.org/manual/index.html , but in general I do not understand why do you want to back up war file or why do you need copy log files to some other location. Most likely to simplify the deployment you have to script the following
1) get source code from version control system
2) build a new war file
3) deploy war file to tomcat