create a new snapshot


accurev mksnap -s <snapshot> -b <existing-stream> -t <time-spec>


The mksnap command creates a new snapshot, based on an existing stream. The snapshot contains the same set of element versions that the existing stream contained at a particular point in time. The existing stream on which a snapshot is based might change, through promotes. But the contents of a snapshot never change. See Entity Names for information on naming snapshots.

You can implement a “changeable snapshot” facility using a dynamic stream. See Using the -t Option in the mkstream reference page.


-s <snapshot>

(required) Specify a name for the new snapshot. The name may begin with a digit (provided there is at least one non-digit in the name), must not begin with a dot (.), must not include either a slash (/) or a backslash (\) and must not be a name of digits only.

-b <backing-stream>

Specify an existing stream, on which the new snapshot will be based.

-t <time-spec>

Snapshot time. The snapshot will contain the versions that were in the stream at the specified time. If you specify a transaction number, the snapshot will include the versions that were in the stream at the time the transaction was completed.

A time-spec can be any of the following:

Time in <"YYYY/MM/DD HH:MM:SS"> format, "2007/08/07 20:27:15", for example. Note that you must use quotes when specifying time-spec as YYYY/MM/DD HH:MM:SS to ensure that the entire argument is interpreted by the command shell as a single token.

Time keyword: now

Transaction number as a positive integer: e.g. 146 or 23965

Transaction number keyword: highest

You cannot specify a time that is before the creation of the existing stream, or after the current time.

When using the –t option, take into account the possibility of a timewarp. The AC_SYNC environment variable (see AccuRev User Preferences) determines how a timewarp will be handled. See also System Clock Synchronization in the AccuRev Admin Guide.


Create a snapshot of the current state of the gizmo stream, calling it gizmo_s1:

   > accurev mksnap -s gizmo_s1 -b gizmo -t now

Create a snapshot of the state of the gizmo stream on May 2nd, 2000 at 2:55pm, calling it gizmo_may2:

   > accurev mksnap -s gizmo_may2 -b gizmo -t "2000/05/02 14:55:00"

See Also

mkstream, promote