Error on restoring backup

Brief description of the problem

Error on restoring backup

Detailed step by step instructions to reproduce the problem

After replacing my primary harddisk I decided to reinstall rather than copying the existing rockstor installation. So I create a backup with the old system installed the new system and tried to restore but got an error, see below. I am running on version 3.9.0-8

Error Traceback provided on the Web-UI

        Traceback (most recent call last):

File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 41, in _handle_exception
yield
File “/opt/rockstor/src/rockstor/storageadmin/views/config_backup.py”, line 235, in post
cbo = self._validate_input(backup_id)
TypeError: _validate_input() takes exactly 2 arguments (1 given)

@William_Wilberforce Yes, I’m pretty sure this one has been fixed but it part of a pending pull request by forum member @dilli, I think @Flyer also noticed it a while back as well. The pull request covers a much larger change and is pending review prior to merge and release in testing channel updates but I’m pretty sure you can just apply the change by hand on your code and restart the rockstor service or reboot and you should be good.

The fix is a small change to line 235 (in master and 3.9.0-8 testing channel update) in /opt/rockstor/src/rockstor/storageadmin/views/config_backup.py
https://github.com/rockstor/rockstor-core/pull/1576/commits/24c2ddf61e5a07fff958aa4432705f1aa51e6526#diff-c759675f7d5bdaa63b9c5b220f2521ceL206
and the commit was entitled “Fix _validate_input() call”

ie change:

                cbo = self._validate_input(backup_id)

into:

                cbo = self._validate_input(backup_id, request)

The following command should help with a manual edit:

nano -c +235 /opt/rockstor/src/rockstor/storageadmin/views/config_backup.py

Then after making and saving the change just reboot and hope for the best :slight_smile:

Hope that helps and let us know how it goes.

Hi Philip,

thanks for the answer! Yes it solved the failure of the import script. However unfortunetaly the config was not imported. I waited a while because a popup announced synchronization could take a bit but nothing happened. No user, no pool, no share was imported.

I have used the function for automatic share detection in the disk administration for the disks I still had. That went fine. Then I recreated the user manually and it seems to be ok.

Regards, Jochen

I’m having the same issue and the fix didn’t help, same error not matter whether change is there or not.

    Traceback (most recent call last):

File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 41, in _handle_exception
yield
File “/opt/rockstor/src/rockstor/storageadmin/views/config_backup.py”, line 235, in post
cbo = self._validate_input(backup_id, request)
TypeError: _validate_input() takes exactly 2 arguments (1 given)

just realized I didn’t reboot, trying that now. That worked. I missed the reboot mention, that is necessary for the change to occur.

@magicalyak Thanks for the update. Yes, reboot or rockstor service restart definitely needed as otherwise the old version of the code is still what’s running.