Thursday, 2 May 2013

Installing s3cmd for S3 backup on Amazon

Find the lalest s3cmd package, i am using s3cmd-1.5.0-alpha1.tar.gz
login as: root
[root@localhost opt]#wget
[root@localhost opt]# tar xvzf s3cmd-1.5.0-alpha1.tar.gz
[root@localhost opt]# ls
[root@localhost opt]# mv s3cmd-1.5.0-alpha1 s3cmd
[root@localhost opt]# ls
[root@localhost opt]# cd s3cmd
[root@localhost s3cmd]# ls
INSTALL  NEWS  PKG-INFO  README  S3  s3cmd  s3cmd.1  setup.cfg
[root@localhost s3cmd]# python install
[root@localhost ~]#s3cmd –help    ( help command)

Configure s3cmd:
[root@localhost ~]# 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: ****************  (entry access key generated by Amazon)
Secret Key: ******************  (enter Secret key generated by Amazon)
Encryption password is used to protect your files from reading
by unauthorized persons while in transfer to S3
Encryption 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]:
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: ****************
Secret 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’
[root@localhost ~]#s3cmd ls    (list your Amazon S3 buckets)

User this command for S3 sync :
s3cmd sync --delete-removed /opt/abc/* s3://buketname

Create automating backup on Amazon S3 with Windows
Download tools below link

Extract and put folder where you want : In my case


and run this command

S3Sync.exe -AWSAccessKeyId XXXXXXX -AWSSecretAccessKey XXXXXXXXX -SyncDirection upload -LocalFolderPath "D:\abc" -BucketName BUCKETNAME

First XXXXXXXX put here access key , second XXXXXXXX put here Secret Key, third change file location with D:\abc , forth change Bucket name with BUCKETNAME.

and create bat file  like s3rsync.bat make entry below the same
cd \
cd D:\S3Sync
S3Sync.exe -AWSAccessKeyId XXXXXXX -AWSSecretAccessKey XXXXXXXXX -SyncDirection upload -LocalFolderPath "D:\abc" -BucketName BUCKETNAME

save and Task Scheduler according to requirement :


Reset Grace Period of Windows Server 2012 RDS

Error: the remote session was disconnected because there are no remote desktop license servers available to provide license in aws Solu...