uskudnik / amazon-glacier-cmd-interface

Command line interface for Amazon Glacier
MIT License
375 stars 103 forks source link

Bacula Glacier Interface? #129

Open kmand opened 11 years ago

kmand commented 11 years ago

I'm confused about how to use glacier-cmd with bacula. I'm using the suggested

RunAfterJob = "/usr/local/bin/glacier-cmd upload /path/to/backups/%v --description %n --bacula"

This ends up with files in the glacier vault which will all have the same description (something like BackupClient) with no reference to bacula "volume name". If I need to do a restore, I presume I need to manually use glacier-cmd to retrieve the correct volumes by archive id from the vault, naming them per their original names, and then run bacula to do the restores.

Is that right, and if so how do I keep track of what archive id's go with which volume names?

Should I be altering the description in the RunAfterJob to include %v in the description? Even then if their multiple volumes (with | ) they would all have the same description.

Unless I'm missing something this seems pretty tedious. Just wondering if someone has worked out something more automated.

wvmarle commented 11 years ago

Make sure you have bookkeeping enabled, and glacier-cmd will take care of remembering which file belongs to what; it's your task go get something useful out of bacula.

My configuration for this:

In bacula-dir.conf: RunAfterJob = "/usr/local/bin/backup_to_glacier \"%v\" \"%j\" \"%l\" \"%s\""

And then this backup_to_glacier script contains the line: echo "/usr/local/bin/glacier-cmd --logtostdout upload Squirrel_backup \"/backup/bacula/$1\" --description \"$2 ($3, since $4)\" --bacula --partsize 64" | batch

This way the lengthy upload does not block bacula, instead it's run in the background and starts when the system is not too busy doing other things, and the file has a rather useful description.