schnapps issueshttps://gitlab.nic.cz/turris/schnapps/-/issues2017-11-20T15:36:40+01:00https://gitlab.nic.cz/turris/schnapps/-/issues/1Can't fork repository2017-11-20T15:36:40+01:00Radoslav ČápCan't fork repositoryI'm trying to fork a repo and I'm getting "You have reached your project limit" error message (see an attachment for details).
I also tried to fork turris-os with the same error. It's possible to fork turris-os on GitHub but there is no...I'm trying to fork a repo and I'm getting "You have reached your project limit" error message (see an attachment for details).
I also tried to fork turris-os with the same error. It's possible to fork turris-os on GitHub but there is no schnapps repo at GitHub.
I the documentation I've found this: https://docs.gitlab.com/ee/user/admin_area/settings/account_and_limit_settings.html
Is it possible to fork schnapps? Or is there any other way to push code and create pull request?![Screenshot_from_2017-11-16_09-47-28](/uploads/889dacbfed4fafe4b3eaa016a8dc679b/Screenshot_from_2017-11-16_09-47-28.png)Radoslav ČápRadoslav Čáphttps://gitlab.nic.cz/turris/schnapps/-/issues/3Exported snapshots are named as omnia-medkit2019-02-02T13:45:25+01:00Karel KociExported snapshots are named as omnia-medkitIt would be better to either detect model/platform or to use some generic name.It would be better to either detect model/platform or to use some generic name.https://gitlab.nic.cz/turris/schnapps/-/issues/4Description import seems to be broken2019-02-02T13:45:36+01:00Karel KociDescription import seems to be brokenWhen importing snapshot it seems that description is not correctly copied to info file on btrfs partition.
I imported following file that was originally exported by schnapps:
```
TYPE="simple"
DESCRIPTION="Medkit"
CREATED="2019-01-31 12...When importing snapshot it seems that description is not correctly copied to info file on btrfs partition.
I imported following file that was originally exported by schnapps:
```
TYPE="simple"
DESCRIPTION="Medkit"
CREATED="2019-01-31 12:45:01 +0100"
```
I imported correctly but `schnapps list` does not show any description:
```
85 | single | 2019-01-31 12:46:12 +0100 |
```Michal HruseckyMichal Hruseckyhttps://gitlab.nic.cz/turris/schnapps/-/issues/2Add ability to update factory with medkit and to rollback to factory with sch...2019-02-02T13:47:14+01:00Karel KociAdd ability to update factory with medkit and to rollback to factory with schnappsIt would be good to allow medkit to be imported by schnapps that would overwritten factory image. Idea is that you can take latest medkit, update factory and do factory reset.
The same way it would be good if you could rollback to facto...It would be good to allow medkit to be imported by schnapps that would overwritten factory image. Idea is that you can take latest medkit, update factory and do factory reset.
The same way it would be good if you could rollback to factory with schnapps.Michal HruseckyMichal Hruseckyhttps://gitlab.nic.cz/turris/schnapps/-/issues/6"schnapps list" does not mark the active snapshot in a my way2019-07-31T11:25:06+02:00Ghost User"schnapps list" does not mark the active snapshot in a my wayCan "schnapps list" show the current snapshot and also the one that will be active after the next reboot? Otherwise it is impossible to say which snapshot is in use or will be in use...Can "schnapps list" show the current snapshot and also the one that will be active after the next reboot? Otherwise it is impossible to say which snapshot is in use or will be in use...https://gitlab.nic.cz/turris/schnapps/-/issues/8[mount] wrong device being mounted to root at boot time2019-08-28T18:53:46+02:00Ghost User[mount] wrong device being mounted to root at boot time> {"kernel":"4.14.137","hostname":"to","system":"ARMv7 Processor rev 1 (v7l)","model":"Turris Omnia","board_name":"cznic,turris-omnia","release":{"distribution":"TurrisOS","version":"5.0-dev","revision":"8e670b0","target":"mvebu/cortexa9...> {"kernel":"4.14.137","hostname":"to","system":"ARMv7 Processor rev 1 (v7l)","model":"Turris Omnia","board_name":"cznic,turris-omnia","release":{"distribution":"TurrisOS","version":"5.0-dev","revision":"8e670b0","target":"mvebu/cortexa9","description":"TurrisOS 5.0-dev 8e670b0"}}
____
started to exibit with todays build, no issue with previous TurrisOS 5.0-dev f64e703
after reboot first run with `schnapps list`produces
> ERROR: unable to access : No such file or directory
> mount: /mnt/.snapshots: wrong fs type, bad option, bad superblock on , missing codepage or helper program, or other error.
> Can't mount root partition
The next go then produces
> ERROR: unable to access : No such file or directory
> mkdir: can't create directory '/tmp/schnapps.lock': File exists
> Another instance seems to be running!
Rebooted a few times, all with the same result as above.
This is not good really, since I really replied on `schnapps` for being able to rollback in case of issues...https://gitlab.nic.cz/turris/schnapps/-/issues/12[patch] Mount custom directory via sshfs2019-11-18T16:04:48+01:00David Beitey[patch] Mount custom directory via sshfsPatch [0001-Allow-custom-path-mounting-for-sshfs.patch](/uploads/460d681b2b535e0b4b90255e1c160162/0001-Allow-custom-path-mounting-for-sshfs.patch)
At present, there is no way of setting `remote.url` to a value
that allows mounting a spe...Patch [0001-Allow-custom-path-mounting-for-sshfs.patch](/uploads/460d681b2b535e0b4b90255e1c160162/0001-Allow-custom-path-mounting-for-sshfs.patch)
At present, there is no way of setting `remote.url` to a value
that allows mounting a specific path over sshfs -- at least not given the way the code is handling `ssh://` URLs.
It appears that the script *was* attempting to allow URLs with a colon
present to pass through unmodified, so someone could specify a custom
directory to found, such as `ssh://host.example.com:/path/on/remote`.
However, the regex check for URLs was testing for `.*:"` (eg colon, double quote) within a protocol-stripped URL (which
it has been at this point in the code, being
`host.example.com:/path/on/remote`). Given how the later `sshfs` line
is called (wraps $FINAL_REMOTE_URL in double quotes), then this would never end up working when the URL is passed to sshfs.
This patch change simplifies the regex match for stripped URLs to just a `.*:`
(colon character somewhere). If schnapps detects a URL that's
been passed to it like the first example above, with a path specified, it will be called like so:
```sh
sshfs host.example.com:/path/on/remote /mnt/.remote-snapshots
```
and correctly mount the specified directory.
Given how the original code was written, it seems like this might have
just been a typo having the double-quote character there.
(I would send a merge request, but I'm not allowed to fork the repo)Michal HruseckyMichal Hruseckyhttps://gitlab.nic.cz/turris/schnapps/-/issues/9[RFC] export/import includes directories from partitions other/foreign than /...2019-11-18T16:31:30+01:00Ghost User[RFC] export/import includes directories from partitions other/foreign than /dev/root> {"kernel":"4.14.138","hostname":"to","system":"ARMv7 Processor rev 1 (v7l)","model":"Turris Omnia","board_name":"cznic,turris-omnia","release":{"distribution":"TurrisOS","version":"5.0-dev","revision":"e4a0679","target":"mvebu/cortexa9...> {"kernel":"4.14.138","hostname":"to","system":"ARMv7 Processor rev 1 (v7l)","model":"Turris Omnia","board_name":"cznic,turris-omnia","release":{"distribution":"TurrisOS","version":"5.0-dev","revision":"e4a0679","target":"mvebu/cortexa9","description":"TurrisOS 5.0-dev e4a0679"}}
____
Assuming that `schnapps` has not awareness of the parition table of the drive devices attached to the router it does not seems to make sense that it however including directories from other/foreign partitions during im/export, least during import it would likely write/restore those directories to the /dev/root partition and not to the partion where the foreign directories are mounted.
Or is `schnapps` aware of the locations of those foreign directories?
![Annotation_2019-08-21_094936](/uploads/3bc23b7b860aaa45fafdbfde7e164dd1/Annotation_2019-08-21_094936.png)
![Annotation_2019-08-21_094916](/uploads/1b1ba163cd83627a889aec7c0494ca4e/Annotation_2019-08-21_094916.png)https://gitlab.nic.cz/turris/schnapps/-/issues/7lockup after lost ssh connectivity during export2020-01-20T21:09:28+01:00Ghost Userlockup after lost ssh connectivity during export> {"kernel":"4.14.133","hostname":"to","system":"ARMv7 Processor rev 1 (v7l)","model":"Turris Omnia","board_name":"cznic,turris-omnia","release":{"distribution":"TurrisOS","version":"5.0-dev","revision":"acbce9c","target":"mvebu/cortexa9...> {"kernel":"4.14.133","hostname":"to","system":"ARMv7 Processor rev 1 (v7l)","model":"Turris Omnia","board_name":"cznic,turris-omnia","release":{"distribution":"TurrisOS","version":"5.0-dev","revision":"acbce9c","target":"mvebu/cortexa9","description":"TurrisOS 5.0-dev acbce9c"}}
___
Whilst running `schnapps export` ssh connectivity with the router got lost. It is not clear what happened to the export process but judging but the size of the exported file it did not finish the export. However, after having restored ssh connectivy any interaction with schnapps exhibited
> mkdir: can't create directory '/tmp/schnapps.lock': File exists
> Another instance seems to be running!
Could not trace the schnapps process via htop and had to reboot the router.https://gitlab.nic.cz/turris/schnapps/-/issues/24'No such file or directory' for empty snapshot list2020-09-14T15:01:20+02:00Lukas Jelinek'No such file or directory' for empty snapshot listSchnapps does't treat well the situation where the snapshot list is empty (there are no snapshots).
### Steps to reproduce
1. Flash a medkit onto your eMMC or SD card or delete all existing snapshots (`schnapps delete <n>`).
2. Reboot ...Schnapps does't treat well the situation where the snapshot list is empty (there are no snapshots).
### Steps to reproduce
1. Flash a medkit onto your eMMC or SD card or delete all existing snapshots (`schnapps delete <n>`).
2. Reboot your router.
3. Run `schnapps list`.
### Expected behavior
It displays an empty list/table or a message that there are no snapshots.
### Actual behavior
It displays a table header and the following error message:
```
ls: /mnt/.snapshots/*.info: No such file or directory
```Lukas JelinekLukas Jelinekhttps://gitlab.nic.cz/turris/schnapps/-/issues/25Error message when there are no snapshots2020-09-16T10:51:04+02:00Vojtech MyslivecError message when there are no snapshotsOn a plain new system after medkit reflash:
```
root@turris:~# schnapps list
# | Type | Size | Date | Description
------+-----------+-------------+-----------------------------+---------------------...On a plain new system after medkit reflash:
```
root@turris:~# schnapps list
# | Type | Size | Date | Description
------+-----------+-------------+-----------------------------+------------------------------------
ls: /mnt/.snapshots/*.info: No such file or directory
```
We should suppress `ls` error output and probably add some error/warning message there are no snapshots present.Turris OS 6.0Michal HruseckyMichal Hruseckyhttps://gitlab.nic.cz/turris/schnapps/-/issues/29ssh identity handling2021-01-04T23:18:22+01:00Jakub Kákonassh identity handlingThe [official documentation](https://docs.turris.cz/geek/schnapps/schnapps/#what-you-can-do-with-schnapps) says:
"The third command uses SSHFS and the user credentials are omitted (it logs in as the current user and authenticates he/sh...The [official documentation](https://docs.turris.cz/geek/schnapps/schnapps/#what-you-can-do-with-schnapps) says:
"The third command uses SSHFS and the user credentials are omitted (it logs in as the current user and authenticates he/she by the key which must be preconfigured in /etc/config/schnapps or ~/.ssh/config or added to the running ssh-agent)."
But the /etc/config/schnapps does not have effective options to setup user identity key for ssh session (username and password is ignored, identity file option does not exists.), the second option ~/.ssh/config needs exact configuration non-intuitively matching to url in the /etc/config/schnapps config.
Expected behaviour is there will be an option for identity file or username in /etc/config/schnapps does not been ignored. I thing the signing in to remote server as root to backup snapshots is very rare option.Michal HruseckyMichal Hruseckyhttps://gitlab.nic.cz/turris/schnapps/-/issues/31Schnapps checks hardcoded mountpoint for quota support2021-01-14T11:53:25+01:00David HopfmuellerSchnapps checks hardcoded mountpoint for quota support**Current behaviour:** schnapps [checks](https://gitlab.nic.cz/turris/schnapps/-/blob/master/schnapps.sh#L159) `/` for quota support.
**Expected behaviour:** schnapps uses `"$TMP_MNT_DIR"` to account for mountpoints other than `/`.
I w...**Current behaviour:** schnapps [checks](https://gitlab.nic.cz/turris/schnapps/-/blob/master/schnapps.sh#L159) `/` for quota support.
**Expected behaviour:** schnapps uses `"$TMP_MNT_DIR"` to account for mountpoints other than `/`.
I wanted to provide a merge requests but looks like I'm missing required permissions. This issue was discussed on the [forum](https://forum.turris.cz/t/possible-bug-in-schnapps-cant-change-the-root-directory-with-d/14564/11).https://gitlab.nic.cz/turris/schnapps/-/issues/35If checksum files does not match, lets ask user if he wants to continue2021-02-22T10:09:06+01:00Josef SchlehoferIf checksum files does not match, lets ask user if he wants to continueWhile using: `schnapps import -f https://repo.turris.cz/hbs/medkit/omnia-medkit-latest.tar.gz` a noticed these issues:
1. If the checksum does not math for `md5sum`, it tries to continue with `sha256sum`, both of them says:
`md5sum: WA...While using: `schnapps import -f https://repo.turris.cz/hbs/medkit/omnia-medkit-latest.tar.gz` a noticed these issues:
1. If the checksum does not math for `md5sum`, it tries to continue with `sha256sum`, both of them says:
`md5sum: WARNING: 1 of 1 computed checksums did NOT match`
`sha256sum: WARNING: 1 of 1 computed checksums did NOT match`
Even if checksums didn't match, it continues to flash the medkit.
`Checksum doesn't match for 'https://repo.turris.cz/hbs/medkit/omnia-medkit-latest.tar.gz'`
_It is almost impossible to check if checksums match or does not as it is really fast._
2. It should warn the user and ask him if he wants to proceed or not. (Yes/no option) or even be strict and don't allow it.
Cross-reference for checksums of medkit:https://gitlab.nic.cz/turris/turris-build/-/issues/233Michal HruseckyMichal Hruseckyhttps://gitlab.nic.cz/turris/schnapps/-/issues/18Better error message for users when there is no specific snapshot2021-02-22T17:41:09+01:00Josef SchlehoferBetter error message for users when there is no specific snapshotI tried to rollback to snapshot which does not exist and it there was this output:
```
root@omnia:~# schnapps rollback 136
ERROR: Could not statfs: No such file or directory
Rolling back failed!
```
Can we change it to something like th...I tried to rollback to snapshot which does not exist and it there was this output:
```
root@omnia:~# schnapps rollback 136
ERROR: Could not statfs: No such file or directory
Rolling back failed!
```
Can we change it to something like this?
```
ERROR: Snapshot does not exists.
Rollback failed!
```Michal HruseckyMichal Hruseckyhttps://gitlab.nic.cz/turris/schnapps/-/issues/5cp: can't stat '/mnt/.snapshots/certbackup/*': No such file or directory2021-04-07T16:38:54+02:00Ghost Usercp: can't stat '/mnt/.snapshots/certbackup/*': No such file or directory1. Recover from medkit
2. Walk through the guided setup while accepting defaults and NOT enabling auto updates
3. At this time there is no snapshot
4. Create a manual (single) snapshot
5. Run "schnapps rollback"
https://forum.turris.cz/...1. Recover from medkit
2. Walk through the guided setup while accepting defaults and NOT enabling auto updates
3. At this time there is no snapshot
4. Create a manual (single) snapshot
5. Run "schnapps rollback"
https://forum.turris.cz/t/schnapps-rollback-issue/10408
```
schnapps rollback
Current state saved as snapshot number 2
Rolled back to snapshot 1
Create subvolume '/tmp/certstore/certbackup'
cp: can't stat '/mnt/.snapshots/certbackup/*': No such file or directory
```https://gitlab.nic.cz/turris/schnapps/-/issues/16Handle non-alphanumeric characters in description2021-04-07T22:11:01+02:00Maciej Lenartowiczmaciej.lenartowicz@nic.czHandle non-alphanumeric characters in descriptionWhen `"` character is in description of a snapshot we get an error:
```
/usr/bin/schnapps: /mnt/.snapshots/31.info: line 3: syntax error: unterminated quoted string
```
or in `/var/log/messages` (when trying to use `foris-controller` to...When `"` character is in description of a snapshot we get an error:
```
/usr/bin/schnapps: /mnt/.snapshots/31.info: line 3: syntax error: unterminated quoted string
```
or in `/var/log/messages` (when trying to use `foris-controller` to get the list of snapshots`):
```
foris-controller[29181]: ERROR:foris_controller.message_router:Internal error occured <class 'json.decoder.JSONDecodeError'>('Expecting ',' delimiter: line 1 column 2386 (char 2385)')
```
Please see if other characters can break it. :)Turris OS 5.2.0Michal HruseckyMichal Hruseckyhttps://gitlab.nic.cz/turris/schnapps/-/issues/40Support Samba2021-07-22T09:11:15+02:00Michal HruseckySupport Sambahttps://gitlab.nic.cz/turris/schnapps/-/issues/36Schnapps creates directory if sshfs mount fails2021-07-22T09:13:30+02:00Lukas JelinekSchnapps creates directory if sshfs mount failsOriginally from this forum comment (by `dmth`): https://forum.turris.cz/t/uploading-snapshots-with-schnapps-by-ssh-help-needed/13532/8
If sshfs is unable to mount the remote directory, for instance because of insufficient file permissio...Originally from this forum comment (by `dmth`): https://forum.turris.cz/t/uploading-snapshots-with-schnapps-by-ssh-help-needed/13532/8
If sshfs is unable to mount the remote directory, for instance because of insufficient file permissions, schnapps will create the folder `/mnt/.remote-snapshotson` the local storage, for instance `mmcblk1p1`, and will even report a successful backup. In my opinion, schnapps should die when sshfs fails.
For the record, this is what worked for me:
1. Store username and Host-IP for the remote host in `.ssh/config` of the turris router.
2. Make sure the user has write permissions to the backup-directory.
3. `schnapps upload NUMBEROFSNAPSHOT ssh://remotehostnamefromsshconfig:/absolute/path/to/directory/`Michal HruseckyMichal Hruseckyhttps://gitlab.nic.cz/turris/schnapps/-/issues/43Can not connect to remotes when the password contains special characters (:@+...2021-08-16T14:25:23+02:00Michal VasilekCan not connect to remotes when the password contains special characters (:@+\) with CLIThis can probably be solved by adding `-p <password>` and `-u <username>` options.This can probably be solved by adding `-p <password>` and `-u <username>` options.