|
|
To replicate an object, it is possible to
|
|
|
1. define a rule
|
|
|
2. invoke it
|
|
|
|
|
|
1) To define a rule that can be invoked by an iRODS icommand called [irule](https://docs.irods.org/master/icommands/user/#irule) means to create a file similar to this (call it, for example, test_rule.r):
|
|
|
|
|
|
Replication {
|
|
|
*source = /My/source/irods/path;
|
|
|
*destination = /My/destination/irods/path;
|
|
|
*registered = bool("true");
|
|
|
*recursive = bool("true");
|
|
|
*status = EUDATReplication(*source, *destination, *registered, *recursive, *response);
|
|
|
if (*status) {
|
|
|
writeLine("stdout", "Success!");
|
|
|
}
|
|
|
else {
|
|
|
writeLine("stdout", "Failed: *response");
|
|
|
}
|
|
|
}
|
|
|
OUTPUT ruleExecOut
|
|
|
|
|
|
2) Then open a shell where the iRODS icommand are available and, after the initial authentication with [iinit](https://docs.irods.org/master/icommands/user/#iinit), type:
|
|
|
|
|
|
$ irule -F test_rule.r
|
|
|
Success!
|
|
|
|
|
|
If the output shows the response "Success!", it works. |
|
|
\ No newline at end of file |