backups: cannot export an archive
Environment:
- Image: v0.40.0 (testing). Image was downloaded and installed on October 19, 2018.
- Hardware: Olimex LIME2. Image is installed on an 8 GB micro SD card.
Report:
What went right:
Step 1. I downloaded and installed a few apps (Coquelicot, Quassel, Searx, Ikiwiki).
Step 2. I then downloaded and installed Backups.
Step 3. I initiated the backup process, selected all the apps whose data I wanted to back up, and pressed "Submit." The backup archive was created successfully.
What went wrong:
Step 4. After the archive had been created, I plugged in a micro SD card into my computer, and clicked "Export" in the archive's text box. On the next screen, I selected the disk corresponding to the SD card and waited. Then, I was greeted with "500: This is an internal error and not something you caused or can fix. Please report the error on the bug tracker so we can fix it. Also, please attach the status log to the bug report." Note: The micro SD card in my LIME2 is 8GB. The micro SD card that I plugged into my computer and attempted to use for the export is also 8GB.
Step 5. Whenever I try to go back to the backups page by clicking the link in the System menu, I am greeted with the same "500" error. So, it appears that I cannot even access the Backups page anymore.
Step 6. Moreover, an odd thing happens when this error comes into view: Plinth indicates that I am not logged in. Here is the screen:
But as soon as I click on the FreedomBox butterfly in the top left, I am taken to the homescreen which indicates that I am indeed still logged in as Admin:
I have seen that others have created issues related to the backups feature, but I will create this issue just in case the cause of my problem is different than the other issues that have already been posted.
Status log:
Here is the status log that I copied when I got the first 500 error after trying to export to an SD in step 4 above:
File "/usr/lib/python3/dist-packages/django/template/base.py", line 957, in render_annotated
return self.render(context)
File "/usr/lib/python3/dist-packages/django/template/defaulttags.py", line 322, in render
return nodelist.render(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 990, in render
bit = node.render_annotated(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 957, in render_annotated
return self.render(context)
File "/usr/lib/python3/dist-packages/django/template/defaulttags.py", line 216, in render
nodelist.append(node.render_annotated(context))
File "/usr/lib/python3/dist-packages/django/template/base.py", line 957, in render_annotated
return self.render(context)
File "/usr/lib/python3/dist-packages/django/template/defaulttags.py", line 216, in render
nodelist.append(node.render_annotated(context))
File "/usr/lib/python3/dist-packages/django/template/base.py", line 957, in render_annotated
return self.render(context)
File "/usr/lib/python3/dist-packages/django/template/defaulttags.py", line 458, in render
url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)
File "/usr/lib/python3/dist-packages/django/urls/base.py", line 91, in reverse
return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line 497, in _reverse_with_prefix
raise NoReverseMatch(msg)
django.urls.exceptions.NoReverseMatch: Reverse for 'download' with arguments '('/dev/mmcblk0p2', 'FreedomBox_backup_2018-10-192055.tar.gz')' not found. 1 pattern(s) tried: ['sys/backups/download/(?P<label>[^/]+)/(?P<name>[^/]+)/$']
[2018-10-19 21:47:37,553] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/backups', 'export', '--name', 'FreedomBox_backup_2018-10-19:20:55', '--filename', '/FreedomBox-backups/FreedomBox_backup_2018-10-192055.tar.gz']
[2018-10-19 21:47:43,596] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/backups', 'info']
[2018-10-19 21:47:49,488] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/backups', 'list']
[2018-10-19 21:47:55,492] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/backups', 'list-exports', '--location', '/var/lib/freedombox/']
[2018-10-19 21:47:56,260] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/backups', 'list-exports', '--location', '/']
[2018-10-19 21:47:57,043] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/backups', 'list-exports', '--location', '/boot']
[2018-10-19 21:47:58,133] django.request ERROR Internal Server Error: /plinth/sys/backups/
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 217, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 215, in _get_response
response = response.render()
File "/usr/lib/python3/dist-packages/django/template/response.py", line 107, in render
self.content = self.rendered_content
File "/usr/lib/python3/dist-packages/django/template/response.py", line 84, in rendered_content
content = template.render(context, self._request)
File "/usr/lib/python3/dist-packages/django/template/backends/django.py", line 66, in render
return self.template.render(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 207, in render
return self._render(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 199, in _render
return self.nodelist.render(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 990, in render
bit = node.render_annotated(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 957, in render_annotated
return self.render(context)
File "/usr/lib/python3/dist-packages/django/template/loader_tags.py", line 177, in render
return compiled_parent._render(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 199, in _render
return self.nodelist.render(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 990, in render
bit = node.render_annotated(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 957, in render_annotated
return self.render(context)
File "/usr/lib/python3/dist-packages/django/template/loader_tags.py", line 72, in render
result = block.nodelist.render(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 990, in render
bit = node.render_annotated(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 957, in render_annotated
return self.render(context)
File "/usr/lib/python3/dist-packages/django/template/loader_tags.py", line 72, in render
result = block.nodelist.render(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 990, in render
bit = node.render_annotated(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 957, in render_annotated
return self.render(context)
File "/usr/lib/python3/dist-packages/django/template/loader_tags.py", line 72, in render
result = block.nodelist.render(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 990, in render
bit = node.render_annotated(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 957, in render_annotated
return self.render(context)
File "/usr/lib/python3/dist-packages/django/template/defaulttags.py", line 322, in render
return nodelist.render(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 990, in render
bit = node.render_annotated(context)
File "/usr/lib/python3/dist-packages/django/template/base.py", line 957, in render_annotated
return self.render(context)
File "/usr/lib/python3/dist-packages/django/template/defaulttags.py", line 216, in render
nodelist.append(node.render_annotated(context))
File "/usr/lib/python3/dist-packages/django/template/base.py", line 957, in render_annotated
return self.render(context)
File "/usr/lib/python3/dist-packages/django/template/defaulttags.py", line 216, in render
nodelist.append(node.render_annotated(context))
File "/usr/lib/python3/dist-packages/django/template/base.py", line 957, in render_annotated
return self.render(context)
File "/usr/lib/python3/dist-packages/django/template/defaulttags.py", line 458, in render
url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)
File "/usr/lib/python3/dist-packages/django/urls/base.py", line 91, in reverse
return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line 497, in _reverse_with_prefix
raise NoReverseMatch(msg)
django.urls.exceptions.NoReverseMatch: Reverse for 'download' with arguments '('/dev/mmcblk0p2', 'FreedomBox_backup_2018-10-192055.tar.gz')' not found. 1 pattern(s) tried: ['sys/backups/download/(?P<label>[^/]+)/(?P<name>[^/]+)/$']
[2018-10-19 21:48:26,115] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/auth-pubtkt', 'generate-ticket', '--uid', 'admin', '--private-key-file', '/etc/apache2/auth-pubtkt-keys/privkey.pem', '--tokens', 'admin']
[2018-10-19 21:48:28,382] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/users', 'get-user-groups', 'admin']