s3sync yml file gotcha

s3sync is a nice ruby utility for backing up data on s3. It works much like rsync (but not completely like it). There are several way to configure the keys but if you are using the yml approach, you need to watchout for this little gotcha If you are specifying the aws access key and secret key in the s3config.yml file you need to make a small change in s3config.rb file. In s3config.rb you need to change the confpath variable to
confpath = ["./", "#{ENV['S3CONF']}", "#{ENV['HOME']}/.s3conf", "/etc/s3conf"]
This makes sure that s3config.rb picks up the config file from same directory too. Once you make this change, s3cmd.rb and s3sync.rb should start working fine. After that you can use it pretty much like rsync and schedule it with cron. If you don't want to load your cpu too much use the --no-md5 option (check the readme file in the package) Do keep a watch on your s3 bill though .. everytime you try to sync, fetching the list of files etc also costs some money.

blog comments powered by Disqus