Saving objects

On shutdown, PPS always saves any modified objects in a persistent filesystem. You can also force PPS to save an object at any time by calling fsync() on the object.

When PPS saves its data in a persistent filesystem, it saves each object in its own file, in a directory hierarchy that reproduces the hierarchy of the PPS object tree. For example, with a default configuration, the PPS object /pps/example/object1 is stored at /var/pps/example/object1.

The default location for the PPS directory is /var/pps. You can use the PPS -p option to change this location.


Changing the directory for persistent storage

The root PPS object tree (/pps by default) may look something like this:

# pwd
# ls -1F

PPS populates its root object tree from the persistence tree (/var/pps by default), where the objects and attributes that you want to persist are stored.

To specify a different directory for persistent storage:
  1. Create your own persistence directory (e.g., mkdir /myobjects).
  2. Start the PPS service from a different mountpoint (e.g., /fs/pps) and specify your new persistence directory:

    pps -m /fs/pps -p /myobjects

Note: You may want to run PPS with the -t option, which configures PPS to write to persistent storage at the interval you specify. Without the -t, you won't see any changes in your persistence directory until PPS exits. For more information, see Running PPS.