PhixFlow Help

Archiving and restoring Stream Sets

By the end of this chapter you will be able to:

  • Set up a task to archive Stream Sets
  • Restore archived Stream Sets

Set up archive task

First set up a Stream to archive:

  • Open a new model
  • Add a Stream with Name Customer Info
  • Open the configuration form for the Stream, and complete the details:
    • Period: Daily
    • Start Date: 01/02/2009
    • Archive After ... Days: 5
    • Save Archive to File: tick
    • Add an attribute with Name CustomerDate, and the following details:
      • Type: Date
      • Expression: _toDate

This Stream has no inputs – but PhixFlow will, by default, create a single record in each Stream Set if there are no inputs to the Stream.
Run Analysis on this Stream. You will get 52 Stream Sets. Check in a few Stream Sets – each one contains a single record with a date unique to that Stream Set.
Now add a task to archive this Stream:

  • Go to the list of Task Plans. Press '+' to add a new Task Plan. Give this Task Plan the details:
  • Name: Archive Customer Info
  • Tick the flag Enabled
  • Press the Apply button
  • Press '+' in the Tasks pane, and select Archive Task
  • In the Archive Task Details form that appears, complete the configuration:
    • Name: Archive Customer Info
    • Press Apply, then go into the Streams tab
    • Drag your new Stream, Customer Info, into the Streams list: you can drag Streams into this list from the Streams list – to bring this up, press the Show the list of Streams button in the Archive Task Details form. However, you can also drag streams in from model views. Open your new model, press the Shift and Ctrl buttons on your keyboard, then select the Stream Customer Info. Keeping Shift, Ctrl and your left mouse button pressed down, drag the Stream into the Streams list of the Archive Task.
  • Save your changes

Run archive task

Right-click on your new Task Plan and press Start. Inspect the log for this task. Take a note of the location of the archive zip file generated.
Open the list of Stream Sets in Customer Info. Stream Sets over the period 01/02/09 – 20/03/09 have now been archived.
Find the archive zip file, and check that this contains the correct number of files – each file contains a single Stream Set.

You can schedule Task Plans containing Archive Tasks just as with standard Analysis Tasks. Commonly, operators set up a single Archive Task Plan that runs daily to do the bulk of regular archiving required across all their large models.

Restore archived data

You have already seen the log entry for the archive task. For archive tasks, an additional log is kept in the Archive Log tab of the Console.
Find the archive log entry for the archive you have just carried out.
To restore this data, you will first need to extract the Stream Set archive files from the archive zip file:

  • Move the archive zip to a convenient location, e.g. C:\PhixFlow\train\restore
  • Extract the Stream Set archive files from the zip
  • Delete the zip file, leaving just the Stream Set archive files in the directory.

Once this is done, you can restore these Streams Sets into PhixFlow:

  • Select the archive log entry in the Console, then press the button Restore Archive
  • Enter the name of the directory that you extracted the archive files to, and press OK.

Check the log details of the restore task to ensure that this was successful. Then open the list of Stream Sets for Customer Info – you will now see that all the Stream Sets are shown as restored. Check the contents of a few of the Stream Sets, checking that the date in the attribute CustomerDate is correct.

Please let us know if we could improve this page feedback@phixflow.com