NAME

Chroniton::State - keeps track of backups between Chroniton invocations

METHODS

new (config, log)

Creates a new object, using config as the configuration (Chroniton::Config), and log as the event log (Chroniton::Messages).

save

Writes the object to disk for use by future invocations of Chroniton.

clear_backups

Forget about all backups.

add_backup(location, full?, contents, date, log)

Adds a backup to the memorized backup sets. Location is the location of the backups, contents is the path of the contents file, date is the time of the backup, and log is the location of the logfile.

add_restore(what, from, date, logfile)

add_archive(location, contents, date, log)

events

Returns the list of all events (backups, restores, archives).

backups

Returns the list of backups.

archives

Returns the list of archives.

last_backup

Returns the time, in seconds past the epoch, of the last backup.

last_full_backup

Returns the time of the last full backups.

last_log

Returns the path of the most recent log.

set_last_log(path)

Sets the path to the most recent log file.