class BackupDriver::StoreCommand

Public Instance Methods

basedir() click to toggle source
# File lib/backup_driver/store_command.rb, line 19
def basedir
  return "mysql/" if options[:mysql]
  ""
end
basename() click to toggle source
# File lib/backup_driver/store_command.rb, line 24
def basename
  driver.create_command.backup_basename
end
bucket() click to toggle source
# File lib/backup_driver/store_command.rb, line 11
def bucket
  options[:bucket]
end
do() click to toggle source
# File lib/backup_driver/store_command.rb, line 3
def do
  driver.log << `/usr/bin/s3cmd put --reduced-redundancy #{encrypted_file} #{bucket}/#{path}`
end
encrypted_file() click to toggle source
# File lib/backup_driver/store_command.rb, line 7
def encrypted_file
  driver.encrypt_command.encrypted_file
end
month() click to toggle source
# File lib/backup_driver/store_command.rb, line 32
def month
  driver.time.strftime("%m-%b")
end
path() click to toggle source
# File lib/backup_driver/store_command.rb, line 15
def path
  "#{basedir}#{basename}/#{year}/#{month}/"
end
year() click to toggle source
# File lib/backup_driver/store_command.rb, line 28
def year
  driver.time.strftime("%Y")
end