Auto Archive
This will write a portion of the definition to disk and restore on re-queue/begin
This helps in coping with extra-large suites.
Archives suite or family nodes *IF* they have child nodes(otherwise does nothing).
Saves the suite/family nodes to disk, and then removes the child nodes from the definition
This saves memory in the server when dealing with huge definitions that are not needed.
It improves the time taken to checkpoint and reduces network bandwidth
If the node is re-queued or begun, the child nodes are automatically restored
Use ecflow_client --restore to reload the archived nodes manually
Care must be taken if you have trigger reference to the archived nodes
The nodes are saved to ECF_HOME/<host>.<port>.ECF_NAME.check, where '/' has been replaced with ':' in ECF_NAME
It should be noted that trigger expressions can determine if a node has been archived using <flag>archived. See the example below.
Automatic archiving is prevented:
- If the node with auto archive attribute has previously been restored. Use re-queue to clear the restored flag.
- If the node or any of its parents are suspended.
Usage
- ecflow_client --archive=/s1 # archive suite s1
- ecflow_client --archive=/s1/f1 /s2 # archive family /s1/f1 and suite /s2
- ecflow_client --archive=force /s1 /s2 # archive suites /s1,/s2 even if they have active tasks
suite s family f1 autoarchive +01:00 # archive one hour after complete endfamily family f2 autoarchive 01:00 # archive at 1 am in morning after complete endfamily family f3 autoarchive 10 # archive 10 days after complete endfamily family f3_1 autoarchive 10 -i # archive 10 days after complete, queued,aborted. i.e if no activity archive after 10 days (ecflow 5.6.1) endfamily family f4 autoarchive 0 # archive immediately after complete, can take up to a minute endfamily family restore task res trigger /s/f1<flag>archived # if node /s1/f1 has been archived, restore it. autorestore /s/f1 endsuite
Auto restore
Archived nodes can be restored manually with a user command or automatically via auto-restore attribute in the definition.
The automatic restore is only applied when a node containing the auto-restore attribute completes.
Restore will fail if:
- Node has not been archived. Also, auto-restore on self is meaningless.
- Node has children, i.e. as a part of replace
- If the file ECF_HOME/ECF_NAME.check does not exist
Usage:
- ecflow_client --restore=/s1/f1 # restore family /s1/f1
- ecflow_client --restore=/s1 /s2 # restore suites /s1 and /s2
Suite and Family nodes can also be restored with attribute autorestore.
Whenever a node completes we check if it has an auto-restore attribute.
If it does, we then try to restore from disk the referenced suite/family node.
extern /s4 extern /s4/f1 extern /s4/f2 suite s family f1 autorestore ./f2 ./f3 ./f4 # autorestore task t1 # when t1 completes, and hence f1, apply restore endfamily family f2 autorestore /s/f1 /s/f3 /s/f4 # autorestore task t1 # when t1 completes, and hence f2, apply restore endfamily family f3 autorestore /s/f1 # autorestore task t1 # when t1 completes, and hence f3, apply restore endfamily family f4 autorestore /s4 /s4/f1 /s4/f2 # this is an extern so allow task t1 # when t1 completes, and hence f4, apply restore endfamily endsuite