Snapshots Plugin issueshttps://gitlab.nic.cz/turris/reforis/reforis-snapshots/-/issues2023-02-20T17:14:18+01:00https://gitlab.nic.cz/turris/reforis/reforis-snapshots/-/issues/11Notify user that reboot is needed after rollback2023-02-20T17:14:18+01:00Martin MatějekNotify user that reboot is needed after rollbackWhen the rollback action is performed, notification that "reboot is needed" is send through web socket. It would be nice to somehow display it to user.
Perhaps in similar way that DNS servers and DHCP leases are handled.
I am not sur...When the rollback action is performed, notification that "reboot is needed" is send through web socket. It would be nice to somehow display it to user.
Perhaps in similar way that DNS servers and DHCP leases are handled.
I am not sure what is the best way to make it visually appealing and useful for the user at the same time, so consider this just as suggestion.
![reforis-snaphost-reboot-notification](/uploads/f26fd5ea980f6c7d5c47e90fda3cd564/reforis-snaphost-reboot-notification.png)Aleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis-snapshots/-/issues/9Add support for savepoint and commit2021-11-01T10:36:34+01:00Karel KociAdd support for savepoint and commitThe schnapps now supports `savepoint` and `commit` commands. These provide a way to implement sessions where any connection lost (unable to access) results in a specified time to rollback and reset of the router. The idea is to protect a...The schnapps now supports `savepoint` and `commit` commands. These provide a way to implement sessions where any connection lost (unable to access) results in a specified time to rollback and reset of the router. The idea is to protect against connection lost when some potentially dangerous configuration is being attempted.https://gitlab.nic.cz/turris/reforis/reforis-snapshots/-/issues/8Add support for snapshot backups2021-11-01T10:32:43+01:00Karel KociAdd support for snapshot backupsSchnapps provides a way to upload snapshots to webdav or SSH server. It is intended as a full system backup solution.
The example remote UCI configuration:
```
config remote 'remote'
# option url 'nextcloud://cloud.example.com'|'...Schnapps provides a way to upload snapshots to webdav or SSH server. It is intended as a full system backup solution.
The example remote UCI configuration:
```
config remote 'remote'
# option url 'nextcloud://cloud.example.com'|'webdav://dav.example.com'
# option path '/turris/backups'
# option user 'myself'
# option password 'password'
option sync_types 'single,time'
```https://gitlab.nic.cz/turris/reforis/reforis-snapshots/-/issues/5An error occurred while fetching data.2022-12-22T13:55:06+01:00Martin PeckaAn error occurred while fetching data.I tried updating from TOS 3.x to hbt by downloading the medkit, creating info file, importing it and rolling "back" to the newly created snapshot (I did not want to import the medkit as factory).
```
root@turris:~# cat /mnt/nas/tmp/omni...I tried updating from TOS 3.x to hbt by downloading the medkit, creating info file, importing it and rolling "back" to the newly created snapshot (I did not want to import the medkit as factory).
```
root@turris:~# cat /mnt/nas/tmp/omnia-medkit-hbt.info
TYPE="pre"
DESCRIPTION="hbt medkit"
CREATED="2020-03-11 22:17:17 +0100"
```
That worked, but it created a schnappshot without a size: (119)
```
root@turris:~# schnapps list
# | Type | Size | Date | Description
------+-----------+-------------+-----------------------------+------------------------------------
@119 | pre | | 2020-03-11 22:17:17 +0100 | hbt medkit
...
117 | time | 17.14MiB | 2020-05-17 01:05:05 +0200 | Snapshot created by cron
118 | single | 112.00KiB | 2020-05-18 00:33:56 +0200 | before test
120 | rollback | 144.00KiB | 2020-05-18 00:44:35 +0200 | Rollback to snapshot 119
121 | pre | 84.04MiB | 2020-05-18 01:06:39 +0200 | Automatic pre-update snapshot
122 | post | 904.00KiB | 2020-05-18 01:12:16 +0200 | Automatic post-update snapshot
```
The reforis plugin can't handle this output.
```
curl 'http://192.168.18.1/reforis/snapshots/api/snapshots' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0' -H 'Accept: application/json' -H 'Accept-Language: cs,en-US;q=0.7,en;q=0.3' --compressed -H 'X-CSRFToken: bc8b671c7c595b44227100545cd0bb4e3f693628' -H 'Connection: keep-alive' -H 'Referer: http://192.168.18.1/reforis/administration/snapshots' -H 'Cookie: _csrf_token=bc8b671c7c595b44227100545cd0bb4e3f693628; session=0bd52ab1-b52f-4c60-abf7-f3d08af7b415'
```
responds with
```
reForis version 0.8.0
500 -- Server error
Error:
Remote Exception: Internal error Expecting value: line 1 column 30 (char 29)('<class 'json.decoder.JSONDecodeError'>')
Extra:
{"module": "schnapps", "action": "list", "kind": "request"}
Trace:
Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/foris_controller/message_router.py", line 117, in process_message File "/usr/lib/python3.7/site-packages/foris_controller/module_base.py", line 61, in perform_action File "/usr/lib/python3.7/site-packages/foris_controller_modules/schnapps/__init__.py", line 30, in action_list File "/usr/lib/python3.7/site-packages/foris_controller/utils.py", line 113, in inner File "/usr/lib/python3.7/site-packages/foris_controller_modules/schnapps/handlers/openwrt.py", line 39, in list File "/usr/lib/python3.7/site-packages/foris_controller_backends/schnapps/__init__.py", line 40, in list File "/usr/lib/python3.7/json/__init__.py", line 348, in loads File "/usr/lib/python3.7/json/decoder.py", line 337, in decode File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode json.decoder.JSONDecodeError: Expecting value: line 1 column 30 (char 29)
```https://gitlab.nic.cz/turris/reforis/reforis-snapshots/-/issues/2Add possibility to sort table.2022-01-20T10:50:58+01:00Bogdan BodnarAdd possibility to sort table.