If anyone is wondering, I have been using this single-line Cron Job on my TrueNAS Core 13.3 server:
Cron Job Description: Daily checkpoint for my pool Command: zpool checkpoint -d -w mypool; zpool checkpoint mypool Run As: root Schedule: 0 3 * * * (03:00 every day)
What this does is create a new checkpoint daily at 03:00. This means that I will never sit on a checkpoint for more than 24 hours, while hopefully giving me enough time to “use” a checkpoint if something goes wrong, as long as I “rewind” the pool or disable the Cron Job before the next time the clock hits 03:00. (Otherwise, the Cron Job will replace the good checkpoint with a new checkpoint after the mistake was made.)
The -w flag is important for the Cron Job, since you want the first half of the command to “exit” only after it finishes discarding the checkpoint. The semicolon is also important, since you want them to run one after the other, even if the first half “fails” because “no checkpoint currently exists”.
Anyone got checkpoints working reliably in TrueNAS Community?
After exporting a checkpointed pool and then invoking zpool import --rewind-to-checkpoint -R /mnt MyPool, the pool does not show up under “Storage” in TrueNAS, even though its datasets become visible. After a reboot, however, the pool shows up under “Disks with exported pools” in the interface and can then be (re-?)imported through the interface. This hitch makes me a little nervous… what’s causing TrueNAS to balk at a pool imported through zpool import?