borgbase / vorta

Desktop Backup Client for Borg Backup
https://vorta.borgbase.com
GNU General Public License v3.0
1.98k stars 130 forks source link

Unable to run a scheduled backup task #234

Closed Turako closed 5 years ago

Turako commented 5 years ago

Describe the bug I've setup both borgackup and vorta on two of my maschines. A manual backup works fine, the scheduled task does not start and gives an error in the log. I am using the borgbackup package from the Ubuntu bionic and installed vorta using "pip3". The "start backup" message from vorta is beeing displayed to the time of the scheduled task, but the backup process itself does not start w/o the given error (see below).

Desktop (please complete the following information):

Additional context If appropriate include logs from

2019-03-23 09:36:00,006 - vorta.scheduler - INFO - Starting background backup for Default 2019-03-23 09:36:00,008 - vorta.notifications - DEBUG - notification not suppressed 2019-03-23 09:36:00,038 - vorta.borg.borg_thread - DEBUG - Using VortaSecretStorageKeyring keyring to store passwords. 2019-03-23 09:36:00,039 - apscheduler.executors.default - ERROR - Job "VortaScheduler.create_backup (trigger: cron[hour='9', minute='36'], next run at: 2019-03-24 09:36:00 CET)" raised an exception Traceback (most recent call last): File "/home/kadamovsky/.local/lib/python3.6/site-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/home/kadamovsky/.local/lib/python3.6/site-packages/vorta/scheduler.py", line 102, in create_backup msg = BorgCreateThread.prepare(profile) File "/home/kadamovsky/.local/lib/python3.6/site-packages/vorta/borg/create.py", line 70, in prepare ret = super().prepare(profile) File "/home/kadamovsky/.local/lib/python3.6/site-packages/vorta/borg/borg_thread.py", line 114, in prepare ret['password'] = keyring.get_password('vorta-repo', profile.repo.url) File "/home/kadamovsky/.local/lib/python3.6/site-packages/vorta/keyring/secretstorage.py", line 24, in get_password collection = secretstorage.get_default_collection(self.connection) File "/home/kadamovsky/.local/lib/python3.6/site-packages/secretstorage/collection.py", line 161, in get_default_collection return Collection(connection) File "/home/kadamovsky/.local/lib/python3.6/site-packages/secretstorage/collection.py", line 44, in __init__ self._collection.get_property('Label') File "/home/kadamovsky/.local/lib/python3.6/site-packages/secretstorage/util.py", line 65, in get_property (signature, value), = self.send_and_get_reply(msg) File "/home/kadamovsky/.local/lib/python3.6/site-packages/secretstorage/util.py", line 47, in send_and_get_reply return self._connection.send_and_get_reply(msg) File "/home/kadamovsky/.local/lib/python3.6/site-packages/jeepney/integrate/blocking.py", line 45, in send_and_get_reply future = self.send_message(message) File "/home/kadamovsky/.local/lib/python3.6/site-packages/jeepney/integrate/blocking.py", line 24, in send_message future = self.router.outgoing(message) File "/home/kadamovsky/.local/lib/python3.6/site-packages/jeepney/routing.py", line 26, in outgoing self.awaiting_reply[msg.header.serial] = handle = self.handle_factory() File "/usr/lib/python3.6/asyncio/events.py", line 694, in get_event_loop return get_event_loop_policy().get_event_loop() File "/usr/lib/python3.6/asyncio/events.py", line 602, in get_event_loop % threading.current_thread().name) RuntimeError: There is no current event loop in thread 'ThreadPoolExecutor-0_0'.

m3nu commented 5 years ago

Seems related to the new SecureStorage integration. I'll provide a fix for it later.

m3nu commented 5 years ago

@Turako , I've reproduced this issue (and the fix) on Ubuntu 18.04. The fix is in v0.6.13.

If you used PIP to install vorta, you can simply update using:

$ pip install -U vorta

Let me know if this also fixes the issue for you.

Turako commented 5 years ago

Good morning @m3nu,

Thank you very much for the fast response. I still get the version 0.6.12 as the "up-to-date" version of vorta usind PIP:

$ pip3 install -U vorta

gives:

vorta (0.6.12) - A GUI for BorgBackup INSTALLED: 0.6.12 (latest)

As soon as I am able to install 0.6.13 I will verify, if the fix is working here, too.

Thanks

m3nu commented 5 years ago

Should be up now. Only did the Github release yesterday.

Turako commented 5 years ago

I can confirm, that v0.6.13 solves the issue #234 on both of my machines here. The scheduler is working like expected. Perfect!