2013-11-21 20:47:10

Glacier-cli - interface to cheap off-site backup

I just got package glacier-cli into Fedora (right now it is in testing-updates).

Amazon Glacier is very cheap solution for archiving. I use it for backing up our family photos. Some of them I have on our family web, but most of them not. And if I ever lost them (due fire or robbery) I would be very sad.

Glacier allows me to store all photos (~ 100 GB) for less then $2 per month. I tried several programs which provides interface to Glacier, but all of them sucks - more or less. Glacier-cli is so far the best tool.

I use this script to upload all new photos to Glacier:

#!/bin/bash
pushd /mnt/home/fotky

glacier-cli --region=eu-west-1 --transcode-names=utf-8 archive list Fotky >/tmp/glacier-list

find -type f |grep -v thumbcache | while read i; do
  grep "$i" < /tmp/glacier-list >/dev/null || \
  ( echo "Uploading $i" && \
  glacier-cli --region=eu-west-1 --transcode-names=utf-8 archive upload --name "$i" Fotky "$i" )
done

popd

That option --transcode-names=utf-8 is not officially part of glacier-cli (yet?). And you can get this patch if your language have accents and you (or your wife) use them in file names.

This script is far from perfect, as it does not delete from Glacier photos, which I deleted localy. Maybe my next step would create git-annex (which glacier-cli support) in my photo dir. And I'm sure you will find your use case for glacier-cli as well.

Happy hacking.


Posted by Miroslav Suchý | Permanent link
Comments
comments powered by Disqus