| Syntax |
|
| Documentation | $backup.setup.add: Add a scheduled backup rule. The rule will be applied, if enabled, after interval time elapsed. The resulting backup file will automatically be stored under backup:// and its name es accessable vie $backup.getLastFile{name}. The value for interval may either be DAILY, WEEKLY, MONTHLY or an integer interpreted as number of hours.
2 - interval; when the rule shall be applied 3 - account_list; whitespace separated account IDs 4 - path_list; (\r)\n separated list of paths to backup 5 - enabled; boolean; initially enable this rule or not
|
| Examples | |
| $io.sendBytes{1}{}
$// backup
$if{$existsCurrent{backup}}{
$io.sendBytes{1}{Adding backup rule. } $backup.setup.add{backup_test}{1}{$getCurrent{i}}{public://index.html}{0} $io.sendBytes{1}{Committing transaction. } $commit{NONE} $io.sendBytes{1}{Flagging backup start. } $backup.start{backup_test} $io.sendBytes{1}{Now waiting for backup to start. This may take a while. } $while{$isEmpty{$backup.getLastFile{backup_test}}}{ $io.sendBytes{1}{Waiting 5 sec... } $sleep{5000} } } { Backup this account now. }
$// restore
$if{$existsCurrent{restore}}{
$set{file}{$backup.getLastFile{backup_test}}
File: $get{file} } $// remove rule $if{$existsCurrent{remove}} { $backup.setup.remove{backup_test} } { $if{$backup.setup.exists{backup_test}}{Remove test backup rule. } } |
|
| Group | Special |
| Minimum required transaction-mode: | UPDATE=TREE |
| Required scripting permission of the developer | PERMISSION_FL_ADMINISTRATIVE |
| Minimum parameters | 5 |
| Maximum parameters | 5 |