Install s3cmd third party software in EC2 Instance.
#apt-get install s3cmd
Configure s3cmd to access your S3 Bucket with below prodecure.
#s3cmd --configure
Enter new values or accept defaults in brackets with Enter.
Refer to user manual for detailed description of all options.
Access key and Secret key are your identifiers for Amazon S3
Access Key : PASTE YOUR ACCESS KEY
Secret Key : PASTE YOUR SECRET KEY
Encryption password is used to protect your files from reading
by unauthorized persons while in transfer to S3
Encryption password: ENTER
Path to GPG program [/usr/bin/gpg]: ENTER
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]: ENTER
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: If your your are using internet proxy to connect internet provide details here or just press ENTER
New settings:
Access Key: YOUR ACCESS KEY
Secret Key: YOUR SERCET KEY
Encryption password:
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...
Not configured. Never mind.
Save settings? [y/N] y
Configuration saved to '/root/.s3cfg'
s3cmd Setup is completed.
#s3cmd ls <--- This command will show your Buckets in your account.
2014-12-16 08:33 s3://bucketwork
<--- Now setup your Source folder and Destination S3 Bucket. --->
#s3cmd sync /home/ubuntu/backup/ s3://bucketwork/
WARNING: Redirected to: bucketwork.s3-ap-southeast-1.amazonaws.com
WARNING: Module python-magic is not available. Guessing MIME types based on file extensions.
/home/ubuntu/backup/2014-12-16/mysql.gz -> s3://bucketwork/2014-12-16/mysql.gz [1 of 1]
375 of 375 100% in 0s 5.43 kB/s done
Done. Uploaded 375 bytes in 0.1 seconds, 5.19 kB/s
Its Done you can set this command as Cron to run whenever you need.
#apt-get install s3cmd
Configure s3cmd to access your S3 Bucket with below prodecure.
#s3cmd --configure
Enter new values or accept defaults in brackets with Enter.
Refer to user manual for detailed description of all options.
Access key and Secret key are your identifiers for Amazon S3
Access Key : PASTE YOUR ACCESS KEY
Secret Key : PASTE YOUR SECRET KEY
Encryption password is used to protect your files from reading
by unauthorized persons while in transfer to S3
Encryption password: ENTER
Path to GPG program [/usr/bin/gpg]: ENTER
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]: ENTER
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: If your your are using internet proxy to connect internet provide details here or just press ENTER
New settings:
Access Key: YOUR ACCESS KEY
Secret Key: YOUR SERCET KEY
Encryption password:
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...
Not configured. Never mind.
Save settings? [y/N] y
Configuration saved to '/root/.s3cfg'
s3cmd Setup is completed.
#s3cmd ls <--- This command will show your Buckets in your account.
2014-12-16 08:33 s3://bucketwork
<--- Now setup your Source folder and Destination S3 Bucket. --->
#s3cmd sync /home/ubuntu/backup/ s3://bucketwork/
WARNING: Redirected to: bucketwork.s3-ap-southeast-1.amazonaws.com
WARNING: Module python-magic is not available. Guessing MIME types based on file extensions.
/home/ubuntu/backup/2014-12-16/mysql.gz -> s3://bucketwork/2014-12-16/mysql.gz [1 of 1]
375 of 375 100% in 0s 5.43 kB/s done
Done. Uploaded 375 bytes in 0.1 seconds, 5.19 kB/s
Its Done you can set this command as Cron to run whenever you need.