Backups aller Skripte und Formulare erzeugen


You have the option of regularly performing automatic backups of your forms and scripts (from email boxes, groups, messaging inboxes, etc.).

To do this, create a new script in the "Script Scheduling" section that runs daily:

image-20250912111912-1.png

In this example, we have set it to run daily at 7 a.m.

Insert this code into the "Script" section and adjust the target path for creating the backup files according to your needs.
It must be a valid path on your todo4teams server, and the necessary write permissions must be present.

try{

var cal = java.util.Calendar.getInstance();
var dayOfMonth = cal.get(java.util.Calendar.DAY_OF_MONTH);

var filename = "/your/backup/path/scripts-"+dayOfMonth+".zip"

var zip = new com.proxemo.todo4.server.ToDoScriptBackupCreator().createAsZip();
var file = new java.io.File(filename);
com.proxemo.xutl.XUTLFileHelper.writeToFile(file , zip);
println("Script backup successfully written: "+filename);
}
catch(e){
println("Error writing script backup: "+e);
}

The script creates rolling backups for each day of the month. In the following month, the backups for the same day are then overwritten.
This means you get a daily version of all scripts with a one-month time horizon.

A zip file is created containing an XML file for each form and JS files for all scripts.