Sunday, October 9, 2016

Backing up database to amazon s3

Go to the following address to download s3tools for linux
http://s3tools.org/usage

apt-get install unzip to install zip for Linux if the downloaded folder needs to unzip

apt-get install s3cmd to install s3tools from command line

Configure the s3
s3cmd --configure to configure the tool for the first time

Access Key: xxxxxxxxxxxxxxxx
Secret Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Encryption password is used to protect your files from reading
by unauthorized persons while in transfer to S3
Encryption password: your_password
Path to GPG program [/usr/bin/gpg]:

When using secure HTTPS protocol all communication with Amazon S3
servers is protected from 3rd party eavesdropping. This method is
slower than plain HTTP and can't be used if you're behind a proxy
Use HTTPS protocol [No]: NO

On some networks all internet access must go through a HTTP proxy.
Try setting it here if you can't conect to S3 directly
HTTP Proxy server name:

New settings:
  Access Key: AKIAJWMP76CEGCZYJJJA
  Secret Key: oxDlDDsXMgYQ+W7ZvmdPKEsjKXoAfZ1DF2J7vK6k
  Encryption password: whitecat
  Path to GPG program: /usr/bin/gpg
  Use HTTPS protocol: False
  HTTP Proxy server name:
  HTTP Proxy server port: 0

Test access with supplied credentials? [Y/n] Y
Please wait, attempting to list all buckets...
Success. Your access key and secret key worked fine :-)

Now verifying that encryption works...
Success. Encryption and decryption worked fine :-)

Save settings? [y/N] y

Configuration saved to '/root/.s3cfg'

Now you can upload the file to s3 using the following commands

s3cmd put /your/path/server/$FILE_NAME.tar.gz s3://backups.joydash.com/path/$FILE_NAME.tar.gz








No comments:

Post a Comment