How do I transfer a tarball from my web server (e.g. http://example.com/backup.tar.gz) to an Amazon S3 bucket? Do I have to download it locally and upload it?
3 Answers
If you have an SSH access to your server and you can use the amazon tools (e.g. the ec2-api-tools
package on Ubuntu), then you can upload your tarball directly from your server. However, if you only have FTP access to it, your only choice (afaik) is to download it and upload it from your workstation.
-
Thank you! I was hoping for some sort of command line solution a la wget, but I suppose I can't have it all...– ethickaApr 29, 2011 at 7:06
-
-
I have a (dv) on MediaTemple that I believe is running CentOS, so Ubuntu is not an option :/– ethickaApr 29, 2011 at 20:03
-
CentOS has
ec2-api-tools
, too : pkgs.org/centos-5-rhel-5/rpmfusion-nonfree-updates-testing-i386/…– raphinkApr 29, 2011 at 20:06 -
Wow... Thank you so much. I confirmed I have Centos, but I'm not sure if I can upload safely via Plesk's application pkg install (screenshot: dnho.es/6MSy). However, I installed it on my Mac and am trying to configure it there and figure it out before I put it on my server.– ethickaApr 29, 2011 at 20:51
You can use minio client aka mc. Using [mc cp] you can achieve this & alternatively write a cron job for same.
$ mc cp backup.tar.gz S3/Mybackupbucket
mc: minio client
cp : copy command
backup.tar.gz: File to be copied on S3 bucket
S3: Alias for https://s3.amazonaws.com
Mybackupbucket: your remote bucket on S3
hope it helps.