wordpress.rake
# Zip up the files and send to S3
Zip up the files and send to S3
Zip up the files and send to S3
def s3_transmit(name, tmp_file)
    backup = "/tmp/#{backup_name(name)}.tar.gz"
    msg "Building tar backup for #{name}"
    cmd = "tar -cpzf #{backup} #{tmp_file}"
    puts cmd
    system cmd
    msg "Sending #{name} backup to S3"
    AWS::S3::S3Object.store(backup.split('/').last, open(backup), bucket_name(name), :access => :private)
    msg "Finished sending #{name} to S3"
    msg "Cleaning up"
    cmd = "rm -rf #{backup} #{tmp_file}"
    puts cmd
    system cmd  
  end
def s3_transmit ( name , tmp_file ) backup = "/tmp/#{backup_name(name)}.tar.gz" msg "Building tar backup for #{name}" cmd = "tar -cpzf #{backup} #{tmp_file}" puts cmd system cmd msg "Sending #{name} backup to S3" AWS :: S3 :: S3Object . store ( backup . split ( '/' ) . last , open ( backup ) , bucket_name ( name ) , :access => :private ) msg "Finished sending #{name} to S3" msg "Cleaning up" cmd = "rm -rf #{backup} #{tmp_file}" puts cmd system cmd end
Zip up the files and send to S3
Zip up the files and send to S3
name
<not_specific>
tmp_file
<not_specific>