What are snapshot schedules
LucidLink Filespaces is based on a log-structured design, making snapshot support a natural extension of our file system. You can schedule and manage snapshots manually or you can schedule these to occur automatically.
Filespaces include default snapshot schedules when initialized via the LucidLink client interface. The default snapshot schedules are:
- four weekly
- seven daily
- six hourly
- four fifteen-minute
Your snapshots created by schedules appear as regular snapshots however rotate based on the underlying snapshot schedule which originally created the snapshot. If you delete your snapshot schedule, your snapshots do not get removed. The rotation no longer exists, therefore the snapshots will remain until manually deleted.
This is important for data recovery, If you are recovering data from a snapshot managed by a snapshot schedule. Removing the schedule ensures that the snapshot persists for the period of time required to perform the recovery. You can simply replace the snapshot schedule with an equal interval and retention to generate newer snapshots of equivalent retention periods.
Filespace snapshot schedules are managed centrally. Once you set up a snapshot schedule, these will be created automatically, whether the LucidLink Client is connected or not. This makes it possible to handle snapshots in distributed environments where multiple LucidLink Clients are connected to the same Filespace.
Administering your snapshots can be achieved via our LucidLink application, under the "Snapshots" section of a filespace.
Currently, you cannot manage Snapshot Schedules from the LucidLink application, this will be added in an upcoming release. For now, Snapshot Schedules must be managed via the CLI.
Command-Line Administration
To create a Snapshot Schedule you first need to be logged into your filespace as a root or admin user.
lucid3 help snapshot-schedule
usage:
Lucid snapshot-schedule [--list]
Lucid snapshot-schedule --create name --interval interval --retention retention [--start datetime]Lucid snapshot-schedule --delete name
Snapshot schedule management - requires root permissions Options:
--password password Root user's password is required for creating and deleting snapshot schedules
[--list] Display the list of existing snapshot schedules--create name Create a snapshot schedule based on interval and retention options. Name format: a-z, A-Z, 0-9, '-_ ()'. Max length 40 chars
--delete name Delete the snapshot schedule with the specified name
[--start] time Local time when the snapshot schedule starts and creates the first snapshot. E.g 1970-01-31T23:00. Default: now
--interval interval Define interval at which to create snapshots (e.g. 1d). Interval units: m-minute; h-hour; d-day; w-week; mo-month; y-year
--retention retention Number of snapshots to keep (e.g. retention 6 for interval 1d means keep last 6 snapshots that are made daily). Snapshots that are exceeding retention count will be automatically deleted
For example, to configure a grandfather-father-son (GFS) retention on your filespace, you can do the following:
lucid3 snapshot-schedule --create "15 minutes" --interval 15m --retention 4 --start 2000-12-31T00:00
lucid3 snapshot-schedule --create "Hourly" --interval 1h --retention 24 --start 2000-12-31T00:00
lucid3 snapshot-schedule --create "Daily" --interval 1d --retention 7 --start 2000-12-31T00:00
lucid3 snapshot-schedule --create "Weekly" --interval 1w --retention 4 --start 2000-12-31T00:00
lucid3 snapshot-schedule --create "Monthly" --interval 1mo --retention 12 --start 2000-12-31T00:00
lucid3 snapshot-schedule --create "Yearly" --interval 1y --retention 2 --start 2000-12-31T00:00
You do not have to specify the
--start
time, but by doing so delineates the point at which the snapshot is created. This is especially useful when you want to keep data from a specific date or time as your Daily, Weekly, Monthly or Yearly snapshot. As LucidLink calculates onward from the date specified it is possible to use a date set in the past to drive the appropriate retention behavior.
The above snapshot schedule is an example and should be modified to suit your retention needs. You will now see snapshots start showing up every 15 minutes when you run lucid3 snapshot --list
.
ID | State | Name | Created On |
---|---|---|---|
1 | valid | Hourly | 2024-10-20 12:00 |
2 | valid | 15 minutes | 2024-10-20 12:15 |
Should you wish to delete a snapshot schedule you can run lucid3 snapshot-schedule --delete <name>
. Note that you may have to delete previously created snapshots individually using lucid3 snapshot --delete <id>.
To access your snapshot data, please refer to our snapshot article for further details on activating and administering your snapshots.