Class: Backup::Targets::Target

Inherits:
Object
  • Object
show all
Defined in:
lib/backup/targets/target.rb

Direct Known Subclasses

Database, Files, Repositories

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(progress, options:) ⇒ Target

Returns a new instance of Target.



11
12
13
14
# File 'lib/backup/targets/target.rb', line 11

def initialize(progress, options:)
  @progress = progress
  @options = options
end

Instance Attribute Details

#optionsBackup::Options (readonly)

Backup creation and restore option flags

Returns:



9
10
11
# File 'lib/backup/targets/target.rb', line 9

def options
  @options
end

#progressBackup::Options (readonly)

Backup creation and restore option flags

Returns:



9
10
11
# File 'lib/backup/targets/target.rb', line 9

def progress
  @progress
end

Instance Method Details

#dump(path, backup_id) ⇒ Object

dump task backup to ‘path`

Parameters:

  • path (String)

    fully qualified backup task destination

  • backup_id (String)

    unique identifier for the backup

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/backup/targets/target.rb', line 20

def dump(path, backup_id)
  raise NotImplementedError
end

#restore(path, backup_id) ⇒ Object

restore task backup from ‘path`

Raises:

  • (NotImplementedError)


25
26
27
# File 'lib/backup/targets/target.rb', line 25

def restore(path, backup_id)
  raise NotImplementedError
end