Class: S3Backup

Inherits:
QuartzPlugin show all
Defined in:
lib/plugins/s3_backup.rb

Constant Summary collapse

@@version_major =
0
@@version_minor =
0
@@version_revision =
1

Instance Method Summary collapse

Methods inherited from QuartzPlugin

#get_version, #initialize, #payload, #run_result, #run_shell

Constructor Details

This class inherits a constructor from QuartzPlugin

Instance Method Details

#infoObject



11
12
13
# File 'lib/plugins/s3_backup.rb', line 11

def info
	{ :uid => "d3533989f9d542f393566511e8eb2090", :name => "S3 Backup", :version => get_version }
end

#run(message) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/plugins/s3_backup.rb', line 15

def run(message)
	pl = payload(message)

	@log.debug "Pruned payload #{pl}"

	@access_key 			= pl['access_key']
	@secret_key 			= pl['secret_key']
	@bucket 				= pl['bucket']
	@region 				= pl['region']
	@remote_path 			= pl['remote_path']
	@local_pattern 			= pl['local_pattern']
	@keep 					= pl['keep'].empty? ? 0 : pl['keep'].to_i

	@testing				= pl['testing']

	return transfer
end