Use the following procedure to configure automatic snapshots of a share and set a retention policy for those snapshots.
Automatic snapshots can be taken half-hourly, hourly, daily, weekly, or monthly and are named .auto[-<snaplabel>]-<timestamp>. Snapshot creation times are stored and executed in UTC format, without regard to such conventions as daylight saving time. For example, a snapshot scheduled for 10:00 a.m. PST (UTC-8) is stored and executed at 18:00 UTC, and this is the time that will appear as the timestamp in the snapshot name.
Automatic snapshots can be set on a project or a share, but not both. Otherwise, overlapping schedules and retention policies would make it impossible to guarantee both schedules. Removing an interval, or changing its retention policy, will immediately destroy any automatic snapshots not covered by the new schedule. Automatic snapshots with clones are ignored.
hostname:> shares select myproject hostname:shares myproject> select demo_share hostname:shares myproject/demo_share>
hostname:shares myproject/demo_share> snapshots automatic hostname:shares myproject/demo_share snapshots automatic>
hostname:shares myproject/demo_share snapshots automatic> create hostname:shares myproject/demo_share snapshots automatic (uncommitted)>
For half-hourly or hourly snapshots, you can choose how many minutes after the half-hour or hour the snapshot is taken. For daily snapshots, you can choose the hour and minute the snapshot is taken, and for weekly or monthly snapshots, you can specify the day, hour, and minute.
Automatic snapshots can be kept forever (except for half-hourly and hourly snapshots, which are capped at 48 and 24, respectively), or they can be limited to a certain number. When the number of snapshots exceeds the number you have specified here, the oldest snapshots will be deleted first.
hostname:shares myproject/demo_share snapshots automatic (uncommitted)> set frequency=day frequency = day (uncommitted) hostname:shares myproject/demo_share snapshots automatic (uncommitted)> set hour=14 hour = 14 (uncommitted) hostname:shares myproject/demo_share snapshots automatic (uncommitted)> set minute=30 minute = 30 (uncommitted) hostname:shares myproject/demo_share snapshots automatic (uncommitted)> set keep=7 keep = 7 (uncommitted)
You can use the get command to view the current uncommitted settings.
hostname:shares myproject/demo_share snapshots automatic (uncommitted)> get frequency = day (uncommitted) day = (unset) hour = 14 (uncommitted) minute = 30 (uncommitted) keep = 7 (uncommitted)
hostname:shares myproject/demo_share snapshots automatic (uncommitted)> commit
You can use the list command to view your new schedule.
hostname:shares myproject/demo_share snapshots automatic> list NAME FREQUENCY DAY HH:MM KEEP automatic-000 day - 14:30 7
hostname:shares myproject/demo_share snapshots automatic> done hostname:shares myproject/demo_share snapshots>