Class: Bosh::Director::Api::BackupManager

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/director/api/backup_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBackupManager

Returns a new instance of BackupManager.



6
7
8
# File 'lib/bosh/director/api/backup_manager.rb', line 6

def initialize
  @destination_path = "#{Config.base_dir}/backup.tgz"
end

Instance Attribute Details

#destination_pathObject (readonly)

Returns the value of attribute destination_path.



4
5
6
# File 'lib/bosh/director/api/backup_manager.rb', line 4

def destination_path
  @destination_path
end

Instance Method Details

#create_backup(username) ⇒ Object



10
11
12
# File 'lib/bosh/director/api/backup_manager.rb', line 10

def create_backup(username)
  JobQueue.new.enqueue(username, Jobs::Backup, 'bosh backup', [destination_path])
end