class

YandexDisk::RetentionConfig

Inherits YAML::Serializable < Reference < Object

How many copies of a backup to keep on the Disk.

A file is kept when it satisfies any configured rule and deleted only when it satisfies none. With keep_last: 7 and keep_days: 30 that means "always the 7 newest, plus anything from the last 30 days" — the forgiving reading, chosen because the failure mode of the other one is deleting a backup someone still needed.

Constructors

new(keep_last : Int32 | Nil = nil, keep_days : Int32 | Nil = nil)
Source
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source

Instance methods

enabled?
Source
keep_days

Always keep files modified within this many days.

Source
keep_days=(keep_days : Int32 | Nil)

Always keep files modified within this many days.

Source
keep_last

Always keep this many of the newest files.

Source
keep_last=(keep_last : Int32 | Nil)

Always keep this many of the newest files.

Source
validate!
Source