lib/backup/model.rb in backup-3.3.2 vs lib/backup/model.rb in backup-3.4.0
- old
+ new
@@ -78,10 +78,11 @@
# After the instance has evaluated the configuration block
# to configure the model, it will be appended to Model.all
def initialize(trigger, label, &block)
@trigger = trigger.to_s
@label = label.to_s
+ @package = Package.new(self)
procedure_instance_variables.each do |variable|
instance_variable_set(variable, Array.new)
end
@@ -228,11 +229,11 @@
# *** Important *** If an error occurs and any of the above mentioned temporary files remain,
# those files *** will be removed *** before the next scheduled backup for the same trigger.
#
def perform!
@started_at = Time.now
- @time = @started_at.strftime("%Y.%m.%d.%H.%M.%S")
+ @time = package.time = @started_at.strftime("%Y.%m.%d.%H.%M.%S")
log!(:started)
prepare!
if databases.any? or archives.any?
@@ -261,24 +262,23 @@
def prepare!
Cleaner.prepare(self)
end
##
- # After all the databases and archives have been dumped and sorted,
+ # After all the databases and archives have been dumped and stored,
# these files will be bundled in to a .tar archive (uncompressed),
# which may be optionally Encrypted and/or Split into multiple "chunks".
# All information about this final archive is stored in the @package.
# Once complete, the temporary folder used during packaging is removed.
def package!
- @package = Package.new(self)
Packager.package!(self)
Cleaner.remove_packaging(self)
end
##
# Removes the final package file(s) once all configured Storages have run.
def clean!
- Cleaner.remove_package(@package)
+ Cleaner.remove_package(package)
end
##
# Returns an array of procedures
def procedures