Manual Snapshots Using the CLI
To access share snapshots, navigate to the share and the snapshots context.
clownfish:> shares select default select builds
clownfish:shares default/builds> snapshots
clownfish:shares default/builds snapshots>
Listing Snapshots (CLI)
Snapshots can be listed using the standard CLI commands.
clownfish:shares default/builds snapshots> list
today
yesterday
clownfish:shares default/builds snapshots>
Taking Manual Snapshots (CLI)
To take a manual project-level snapshot, navigate to the project and snapshot node and then
use the snapshot command:
clownfish:cd /
clownfish:shares select myproject snapshots
clownfish:shares myproject snapshots> snapshot cob_monday
To take a manual share-level snapshot of an individual share, navigate to that share and use
the snapshot command there:
clownfish:cd /
clownfish:shares select myproject select share1 snapshots
clownfish:snapshot lunchtime
Renaming a Snapshot (CLI)
To rename a snapshot, use the rename command:
clownfish:shares default/builds snapshots> rename test test2
clownfish:shares default/builds snapshots>
Destroying a Snapshot (CLI)
To destroy a snapshot, use the destroy command:
clownfish:shares default/builds snapshots> select test2
clownfish:shares default/builds@test2> destroy
This will destroy this snapshot. Are you sure? (Y/N)
clownfish:shares default/builds snapshots>
You can also use the destroy command from the share context without
selecting an individual snapshot:
clownfish:shares default/builds snapshots> destroy test2
This will destroy this snapshot. Are you sure? (Y/N)
clownfish:shares default/builds snapshots>
Rolling back to a Snapshot (CLI)
To rollback to a snapshot, select the target snapshot and run the rollback
command:
clownfish:shares default/builds snapshots> select today
clownfish:shares default/builds@today> rollback
Rolling back will revert data to snapshot, destroying newer data. Active
initiators will be disconnected.
Continue? (Y/N)
clownfish:shares default/builds@today>
Cloning a Snapshot (CLI)
To clone a snapshot, use the clone command. This command will place you
into an uncommitted share context identical to the one used to create shares. From here, you can
adjust properties as needed before committing the changes to create the clone.
clownfish:shares default/builds snapshots> select today
clownfish:shares default/builds@today> clone testbed
clownfish:shares default/testbed (uncommitted clone)> get
aclinherit = restricted (inherited)
aclmode = discard (inherited)
atime = true (inherited)
checksum = fletcher4 (inherited)
compression = off (inherited)
copies = 1 (inherited)
mountpoint = /export/testbed (inherited)
quota = 0 (default)
readonly = false (inherited)
recordsize = 128K (inherited)
reservation = 0 (default)
secondarycache = all (inherited)
nbmand = false (inherited)
sharesmb = off (inherited)
sharenfs = on (inherited)
snapdir = hidden (inherited)
vscan = false (inherited)
sharedav = off (inherited)
shareftp = off (inherited)
root_group = other (default)
root_permissions = 777 (default)
root_user = nobody (default)
quota_snap = true (default)
reservation_snap = true (default)
clownfish:shares default/testbed (uncommitted clone)> set quota=10G
quota = 10G (uncommitted)
clownfish:shares default/testbed (uncommitted clone)> commit
clownfish:shares default/builds@today>
The command also supports an optional first argument, which is the project in which to create
the clone. By default, the clone is created in the same project as the share being cloned.
Listing Dependent Clones Using the CLI
To list all clones created from a particular snapshot (dependent clones), navigate to the
snapshot and then use the list clones command.
clonefish:shares default/builds> snapshots
clonefish:shares default/builds snapshots> select today
clonefish:shares default/builds@today> list clones
Clones: 2 total
PROJECT SHARE
default testbed
default production
clonefish:shares default/builds@today>
The result shows clone names and the project where the clone resides.
Scheduled Snapshots Using the CLI
Automatic scheduled snapshots can be configured using the automatic command
from the snapshot context, at the project level of that of an individual share. Once in this
context, new intervals can be added and removed with the create and
destroy commands. Each interval has a set of properties that map to the BUI view
of the frequency, offset, and number of snapshots to keep. Schedules are maintained in UTC format.
clownfish:shares default/builds snapshots> automatic
clownfish:shares default/builds snapshots automatic> create
clownfish:shares default/builds snapshots automatic (uncommitted)> set frequency=day
frequency = day (uncommitted)
clownfish:shares default/builds snapshots automatic (uncommitted)> set hour=14
hour = 14 (uncommitted)
clownfish:shares default/builds snapshots automatic (uncommitted)> set minute=30
minute = 30 (uncommitted)
clownfish:shares default/builds snapshots automatic (uncommitted)> set keep=7
keep = 7 (uncommitted)
clownfish:shares default/builds snapshots automatic (uncommitted)> get
frequency = day (uncommitted)
day = (unset)
hour = 14 (uncommitted)
minute = 30 (uncommitted)
keep = 7 (uncommitted)
clownfish:shares default/builds snapshots automatic (uncommitted)> commit
clownfish:shares default/builds snapshots automatic> list
NAME FREQUENCY DAY HH:MM KEEP
automatic-000 day - 14:30 7
clownfish:shares default/builds snapshots automatic> done
clownfish:shares default/builds snapshots>
Setting the Scheduled Snapshot Label Using the CLI
In the BUI, the "scheduled snapshot label" property can be set for either a project or a
share. Likewise, in the CLI, the label can be set by first navigating to either the project or share
context. To create a scheduled snapshot label, use the set snaplabel command:
clownfish:shares project1/share1> set snaplabel=project1:share1