I am attempting to integrate an s3 backup for my images directory into a gem. I am having some difficulty getting the thing moved over into my bucket.
def backup_directory
backup_file = Tempfile.new("dump")
cmd = "#{RAILS_ROOT}/public/system/"
cmd += " | gzip > #{backup_file.path}"
run(cmd)
backup_file
end
Tempfile.new is associated with the AWS/S3 gem
The method as show above gives me a Permission denied error. I have also used cp #{Rails_ROOT}/public/system/
but that also does not work.