<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=718161612-10122004>Hello, I am trying
to find out how to backup my modules in regular time intervals. For example, in
order to backup other resources I use Scheduled Tasks to instantiate an object
that backups my resources. The code of the class that performs the backup is as
follows:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=718161612-10122004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=718161612-10122004>--------------------------------------------------------------------------------------</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=718161612-10122004> public class
EXTRANETBackup implements I_CmsCronJob {<BR> <BR> public
String launch(CmsObject cms, String parameter) throws Exception
{</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV><FONT><SPAN
class=718161612-10122004>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial
size=2></FONT><BR><FONT face=Arial><FONT size=2> //get the
path to export data<BR> String rootPath =
cms.readProperty("/ING-EXTRANET/ADMIN/BACKUP/admin_backup","Title").toString();//"c:/backup/opencms/ing/";<BR>
if (rootPath==null || "".equals(rootPath))<BR>
{<BR> rootPath="c:/";<BR>
}<BR> // set all paths for static export<BR>
String[] pathArray = new String[]
{<BR>
"/EXTRANET/",<BR>
"/system/galleries/pics/EXTRANET-image-gallery/"};<BR> <BR>
// get date for filename extension<BR> Calendar today =
Calendar.getInstance();<BR> today.setTime(new
Date());<BR> int day_of_week =
(today.get(Calendar.DAY_OF_WEEK));<BR> <BR> String
fileName = rootPath + day_of_week;<BR> <BR> boolean
includeSystem = true; // include system folder?<BR> boolean
incremental = false; // full or incremental
backup<BR> <BR> // start export of choosen
recources<BR>
cms.exportResources(fileName,pathArray,includeSystem,incremental);<BR><SPAN
class=718161612-10122004>---------------------------------------------------------------------</SPAN></FONT></FONT></DIV>
<DIV><SPAN class=718161612-10122004><FONT face=Arial size=2>Can you please give
me a tip on how to backup my modules in specific time
intervals?</FONT></SPAN></DIV>
<DIV><SPAN class=718161612-10122004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=718161612-10122004><FONT face=Arial size=2>Thank
you</FONT></SPAN></DIV>
<DIV><SPAN class=718161612-10122004><FONT face=Arial
size=2></FONT></SPAN> </DIV></SPAN></FONT></BODY></HTML>