basak / glacier-cli

Command-line interface to Amazon Glacier
Other
617 stars 55 forks source link

Check if upload fails from shell script #28

Closed nunchucks closed 11 years ago

nunchucks commented 11 years ago

from shell script, how to check if the file was successfully uploaded to vault or not? does glacier.py returns something which i can check to see if upload was successful or failed? i am using a shell script to schedule backups to glacier. i want to be notified by e-mail if the upload fails somehow.

basak commented 11 years ago

glacier.py should return with an error printed to stderr and a non-zero exit status if there was a problem with the upload. Like other well-behaved Unix commands, it is silent upon success.

If there is a possibility of failure where glacier.py fails to complete the upload and returns a zero exit code, then that is a bug.

Try somewhere like http://unix.stackexchange.com if you need help writing a shell script that can make use of the exit code.

nunchucks commented 11 years ago

many many thanks @basak . That did the job. :)