Using Amazon S3 on Ubuntu
From Brandonhutchinson.com
(Difference between revisions)
(→''s3sync'' configuration) |
|||
| (One intermediate revision not shown.) | |||
| Line 27: | Line 27: | ||
$ '''sudo chown ''your_user_ID'' /opt/s3sync/s3_variables''' | $ '''sudo chown ''your_user_ID'' /opt/s3sync/s3_variables''' | ||
| - | I use aliases for ''cockpit'', ''s3cmd'', ''s3sync''. | + | I use aliases for ''cockpit.sh'', ''s3cmd.rb'', ''s3sync.rb''. |
$ '''cat - << BASHRC >> ~/.bashrc''' | $ '''cat - << BASHRC >> ~/.bashrc''' | ||
| + | > '''alias cockpit='JETS3T_HOME=/opt/jets3t sh /opt/jets3t/bin/cockpit.sh'''' | ||
> '''alias s3cmd='. /opt/s3sync/s3_variables ; /opt/s3sync/s3cmd.rb'''' | > '''alias s3cmd='. /opt/s3sync/s3_variables ; /opt/s3sync/s3cmd.rb'''' | ||
> '''alias s3sync='. /opt/s3sync/s3_variables ; /opt/s3sync/s3sync.rb'''' | > '''alias s3sync='. /opt/s3sync/s3_variables ; /opt/s3sync/s3sync.rb'''' | ||
Current revision
I primarily use s3sync to interact with my Amazon S3 account, but also install JetS3t Cockpit in case I want to use a GUI.
These are my quick-and-dirty notes on setting up s3sync and JetS3t Cockpit on Ubuntu Feisty. I referenced the excellent page How I automated my backups to Amazon S3 using s3sync for most of this information; please read that page before proceeding.
Contents |
JetS3t Cockpit installation
$ wget https://jets3t.dev.java.net/releases/jets3t-0.5.0.zip $ sudo mkdir /opt/jets3t $ sudo unzip -d /opt/jets3t jets3t-0.5.0.zip
s3sync installation
$ sudo apt-get -y install ruby libopenssl-ruby $ wget http://s3.amazonaws.com/ServEdge_pub/s3sync/s3sync.tar.gz $ sudo mkdir /opt/s3sync $ sudo tar zxvf s3sync.tar.gz -C /opt/ $ sudo chmod go-w /opt/s3sync $ ( DIR=`mktemp -d` ; cd $DIR ; wget http://mirbsd.mirsolutions.de/cvs.cgi/~checkout~/src/etc/ssl.certs.shar ; > sh ssl.certs.shar ; sudo mv f73e89fd.0 /opt/s3sync ; cd .. ; rm -r $DIR )
s3sync configuration
$ sudo sh -c 'cat - << S3_VARIABLES > /opt/s3sync/s3_variables > export AWS_ACCESS_KEY_ID=AWS_ACCESS_KEY_ID > export AWS_SECRET_ACCESS_KEY=AWS_SECRET_ACCESS_KEY > export RUBYLIB=$RUBYLIB:/opt/s3sync > export SSL_CERT_DIR=/opt/s3sync > S3_VARIABLES $ sudo chmod 400 /opt/s3sync/s3_variables $ sudo chown your_user_ID /opt/s3sync/s3_variables
I use aliases for cockpit.sh, s3cmd.rb, s3sync.rb.
$ cat - << BASHRC >> ~/.bashrc > alias cockpit='JETS3T_HOME=/opt/jets3t sh /opt/jets3t/bin/cockpit.sh' > alias s3cmd='. /opt/s3sync/s3_variables ; /opt/s3sync/s3cmd.rb' > alias s3sync='. /opt/s3sync/s3_variables ; /opt/s3sync/s3sync.rb' > BASHRC
