I am getting the following error on executing the backup-push command:
# envdir /etc/wal-e.d/env wal-e backup-push /var/lib/postgresql/9.5/main
wal_e.main INFO MSG: starting WAL-E
DETAIL: The subcommand is "backup-push".
STRUCTURED: time=2017-06-14T21:33:56.131389-00 pid=17559
wal_e.main CRITICAL MSG: An unprocessed exception has avoided all error handling
DETAIL: Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/wal_e/blobstore/wabs/wabs_util.py", line 27, in <module>
from azure.storage.blob import BlobService
ImportError: cannot import name 'BlobService'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/wal_e/cmd.py", line 589, in main
backup_cxt = configure_backup_cxt(args)
File "/usr/local/lib/python3.5/dist-packages/wal_e/cmd.py", line 504, in configure_backup_cxt
from wal_e.blobstore import wabs
File "/usr/local/lib/python3.5/dist-packages/wal_e/blobstore/wabs/__init__.py", line 11, in <module>
from wal_e.blobstore.wabs.wabs_util import do_lzop_get
File "/usr/local/lib/python3.5/dist-packages/wal_e/blobstore/wabs/wabs_util.py", line 29, in <module>
from azure.storage import BlobService
ImportError: cannot import name 'BlobService'
STRUCTURED: time=2017-06-14T21:33:56.356868-00 pid=17559
I have already tried updated Python and Azure
wal-e version: 1.0.3 SO: Ubuntu Server 16.4.1 LTS
Any idea?
I tried to reproduce your issue successfully, and I reviewed the source code of the
wal-eversion1.0.3, then I discovered the issue was caused by thewal-eversion1.0.3actually required theazure-storageversion less than0.20.3, but installed the latestazure-storageversion0.34.3when you were installing viapip3 install wal-e[azure]. Please check your current version ofazure-storageviapip3 freeze | grep azure-storage.So there are two solution for resolving the issue, as below.
azure-storageversion to0.20.3viapip3 install azure-storage==0.20.3.wal-eversion to1.1.0b1which required the latestazure-storageversion and be compatible with the old version, viapip3 install wal-e==1.1.0b1.Hope it helps.