The zfs backup tool
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
640 B

package main
/*
PoolNameRegex will match a zfs pool and filesystem tree
*/
const PoolNameRegex string = "(?:[[:word:]-.]+)+(?:/?[[:word:]-.]+)*"
const zfsRegexStart string = "zfs-auto-snap"
const zfsRegexIncrement string = "(?P<increment>yearly|monthly|weekly|daily|hourly|frequent)"
const zfsRegexDateStamp string = "(?P<year>[[:digit:]]{4})-(?P<month>[[:digit:]]{2})-(?P<day>[[:digit:]]{2})-(?P<hour>[[:digit:]]{2})(?P<minute>[[:digit:]]{2})"
/*
ZfsSnapshotNameRegex will match the name of a snapshot created by zfs-auto-snapshot
*/
const ZfsSnapshotNameRegex string = zfsRegexStart + "_" + zfsRegexIncrement + "-" + zfsRegexDateStamp