ActiveBackup::Archive
Constants
DB_MEMBER = "db.dump"
FILES_PREFIX = "files/"
MANIFEST_MEMBER = "manifest.json"
Class methods
Copies a file into the archive member io while hashing. Kept as a separate method: nesting this File.open block inside the add_file block trips a Crystal 1.21 codegen bug (nested block inlining) at the call site.
restore(path : String, *, database_url : String | Nil = nil, roots : Hash(String, String) = {} of String => String, clean : Bool = false, verify : Bool = true) : JSON::Any
Restores a backup: verifies member checksums, restores file trees
and the database. roots overrides manifest destinations
({"storage" => "/new/loc"}); clean: true drops objects before
recreating them (pg_restore --clean). Returns the manifest.