module

ActiveBackup

Constants

FORMAT = "crails-active-backup"
FORMAT_VERSION = 1
VERSION = "0.1.0"

Class methods

config
Source
config=(config : Config)
Source
configure
Source
create(*, name : String | Nil = nil, now : Time = Time.utc) : Store::Entry

Creates a backup and returns the store entry.

Source
generate_name(now : Time = Time.utc) : String

Default archive name: backup-<UTC stamp>.tar.gz. Two backups within the same second get a random suffix to avoid clobbering.

Source
latest_name
Source
prune(now : Time = Time.utc) : Array(String)

Applies the retention policy; returns the deleted names.

Source
resolve_database_url
Source
restore(name : String | Nil = nil, *, database_url : String | Nil = nil, roots : Hash(String, String) = {} of String => String, clean : Bool = false, verify : Bool = true) : JSON::Any

Restores a backup by name (default: the newest). database_url / roots override the manifest; clean: true drops objects before recreating them. Returns the manifest.

Source
store
Source

Nested types