Ahh, so it's shell problem actually? That's actually probably explains, why the hook for acme.sh somehow doesn't work. Is there some workaround I can give a try?
That's really unlikely it won't be anyhow addressed in 5... As 6 do have another issue and this doping connection is really bad...
BTW, how I can test the TOS6? There is not working guest WAN, but I may survive without... rather then this infinite network dropping each few min/s... :/
... and here should be inverted condition. Definitely you won't to delete all snapshots what are in local...
https://gitlab.nic.cz/turris/schnapps/-/blob/master/schnapps.sh#L735 Instead of
@735 [ -f "$TMP_MNT_DIR/$num.info" ] || continue
should be rather
@735 [ -f "$TMP_MNT_DIR/$num.info" ] && continue
FIX:
diff --git a/schnapps.sh b/schnapps.sh
index 1d6a734..6425fa0 100755
--- a/schnapps.sh
+++ b/schnapps.sh
@@ -709,7 +709,7 @@ upload() {
}
info2num() {
- echo "$1" | sed -n 's|.*[/-]\([0-9]*\).info$|\1|'
+ echo "$1" | sed 's|.*[/-]\([0-9]*\).info$|\1|'
}
sync_snps() {
@@ -725,7 +725,7 @@ sync_snps() {
local num="$(info2num "$info")"
if expr "$SYNC_TYPES" : ".*$TYPE.*" > /dev/null; then
[ -f "$TMP_RMT_MNT_DIR/$REMOTE_PATH/$BOARD-medkit-$HOSTNAME-$num.info" ] \
- || upload "$i"
+ || upload "$num"
fi
done
if [ "$REMOTE_KEEP" != 1 ]; then
hmm, but sync doesn't work at all... #48 (closed)
The description of sync says, it should load all snapshots to remote location and should be readable by rlist. However it's not true.
It's more like "upload" or "export" then sync with remote location, but without .info file.
I had download version of schnapps from one of patch version, because of webdav fix.
Turris 1.0, TurrisOS 5.3.3
Usecase:
wget -q https://gitlab.nic.cz/turris/schnapps/-/raw/93e5a20f9daaa86b71156ca53c83ae955ea58331/schnapps.sh?inline=false -O schnapps.sh
root@turris:~# ./schnapps.sh list
# | Type | Size | Date | Description
------+-----------+-------------+---------------------------+------------------------------------
30 | post | 8.76MiB | 2021-11-13 18:59:16 +0100 | Automatic post-update snapshot
32 | time | 8.70MiB | 2021-11-21 01:05:03 +0100 | Snapshot created by cron
33 | time | 8.70MiB | 2021-11-28 01:05:03 +0100 | Snapshot created by cron
34 | time | 8.72MiB | 2021-12-05 01:05:04 +0100 | Snapshot created by cron
35 | time | 8.72MiB | 2021-12-12 01:05:03 +0100 | Snapshot created by cron
36 | pre | 8.72MiB | 2021-12-14 16:02:42 +0100 | Automatic pre-update snapshot
37 | post | 8.72MiB | 2021-12-14 16:02:54 +0100 | Automatic post-update snapshot
38 | time | 816.00KiB | 2021-12-19 01:05:02 +0100 | Snapshot created by cron
39 | pre | 288.00KiB | 2021-12-20 12:42:03 +0100 | Automatic pre-update snapshot
40 | post | 128.00KiB | 2021-12-20 12:43:10 +0100 | Automatic post-update snapshot
41 | pre | 128.00KiB | 2021-12-20 16:27:24 +0100 | Automatic pre-update snapshot
42 | rollback | 257.08MiB | 2021-12-20 21:57:27 +0100 | Rollback to snapshot 38
43 | pre | 160.00KiB | 2021-12-20 22:01:27 +0100 | Automatic pre-update snapshot
44 | post | 96.00KiB | 2021-12-20 22:02:32 +0100 | Automatic post-update snapshot
45 | pre | 144.00KiB | 2021-12-21 01:24:27 +0100 | Automatic pre-update snapshot
46 | post | 12.20MiB | 2021-12-21 01:39:15 +0100 | Automatic post-update snapshot (TurrisOS 5.3.3)
47 | single | 220.00KiB | 2021-12-21 18:45:19 +0100 | post upgrade TOC5
root@turris:~# ./schnapps.sh rlist
# | Type | Size | Date | Description
----------------------+-----------+-------------+---------------------------+------------------------------------
root@turris:~# ./schnapps.sh sync -t time
./
./bin/
./bin/killall
./bin/vi
./bin/test
...
...
...
...
./.gnupg/random_seed
./var
./boot.scr
Current system was exported into /NetBackup/turris on webdav://xxxx.yyyyy.zz:5006/ as schnapps-medkit-20211222
root@turris:~# ./schnapps.sh list
# | Type | Size | Date | Description
------+-----------+-------------+---------------------------+------------------------------------
30 | post | 8.76MiB | 2021-11-13 18:59:16 +0100 | Automatic post-update snapshot
32 | time | 8.70MiB | 2021-11-21 01:05:03 +0100 | Snapshot created by cron
33 | time | 8.70MiB | 2021-11-28 01:05:03 +0100 | Snapshot created by cron
34 | time | 8.72MiB | 2021-12-05 01:05:04 +0100 | Snapshot created by cron
35 | time | 8.72MiB | 2021-12-12 01:05:03 +0100 | Snapshot created by cron
36 | pre | 8.72MiB | 2021-12-14 16:02:42 +0100 | Automatic pre-update snapshot
37 | post | 8.72MiB | 2021-12-14 16:02:54 +0100 | Automatic post-update snapshot
38 | time | 816.00KiB | 2021-12-19 01:05:02 +0100 | Snapshot created by cron
39 | pre | 288.00KiB | 2021-12-20 12:42:03 +0100 | Automatic pre-update snapshot
40 | post | 128.00KiB | 2021-12-20 12:43:10 +0100 | Automatic post-update snapshot
41 | pre | 128.00KiB | 2021-12-20 16:27:24 +0100 | Automatic pre-update snapshot
42 | rollback | 257.08MiB | 2021-12-20 21:57:27 +0100 | Rollback to snapshot 38
43 | pre | 160.00KiB | 2021-12-20 22:01:27 +0100 | Automatic pre-update snapshot
44 | post | 96.00KiB | 2021-12-20 22:02:32 +0100 | Automatic post-update snapshot
45 | pre | 144.00KiB | 2021-12-21 01:24:27 +0100 | Automatic pre-update snapshot
46 | post | 12.20MiB | 2021-12-21 01:39:15 +0100 | Automatic post-update snapshot (TurrisOS 5.3.3)
47 | single | 220.00KiB | 2021-12-21 18:45:19 +0100 | post upgrade TOC5
root@turris:~# ./schnapps.sh rlist
# | Type | Size | Date | Description
----------------------+-----------+-------------+---------------------------+------------------------------------
Listing of target folder:
dav:/NetBackup/turris/> ls
Listing collection `/NetBackup/turris/': succeeded.
Coll: old 0 Dec 22 00:57
*schnapps-medkit-turris-20211221.tar.gz 103378475 Dec 22 00:05
*schnapps-medkit-turris-20211222.tar.gz 103378786 Dec 22 01:08
dav:/NetBackup/turris/>
EXPECTED: Local and remote location are in sync, snapshots + .info
ACTUAL: Only one exported medkit file, nothing else, no .info for later import etc.
aahh, it's not yet merged... after downloading samba branch version its working fine....
wget -q https://gitlab.nic.cz/turris/schnapps/-/raw/93e5a20f9daaa86b71156ca53c83ae955ea58331/schnapps.sh?inline=false -O schnapps.sh
root@turris:~# ./schnapps.sh rlist
# | Type | Size | Date | Description
----------------------+-----------+-------------+---------------------------+------------------------------------
schnapps-medkit-1 | pre | 49.3M | 2020-09-14 09:57:05 +0200 | Automatic pre-update snapshot
schnapps-medkit-2 | post | 77.2M | 2020-09-14 10:10:19 +0200 | Automatic post-update snapshot
schnapps-medkit-24 | time | 89.9M | 2021-10-10 01:05:01 +0200 | Snapshot created by cron
schnapps-medkit-25 | time | 89.9M | 2021-10-17 01:05:03 +0200 | Snapshot created by cron
schnapps-medkit-26 | time | 89.9M | 2021-10-24 01:05:01 +0200 | Snapshot created by cron
schnapps-medkit-27 | time | 89.9M | 2021-10-31 01:05:01 +0200 | Snapshot created by cron
schnapps-medkit-28 | time | 89.9M | 2021-11-07 01:05:04 +0100 | Snapshot created by cron
schnapps-medkit-3 | pre | 261.1M | 2020-09-14 12:03:37 +0200 | Automatic pre-update snapshot
schnapps-medkit-4 | post | 201.5M | 2020-09-14 12:13:47 +0200 | Automatic post-update snapshot
schnapps-medkit-5 | single | 89.9M | 2020-12-02 16:54:29 +0100 | base-2020-12-02
Seems not change...
root@turris:~# wget -q https://gitlab.nic.cz/turris/schnapps/-/raw/master/schnapps.sh
root@turris:~# chmod +x schnapps.sh
root@turris:~# ./schnapps.sh rlist
/tmp/tmp.DNgCdk/dav-config:2: malformed line
Can't access remote filesystem
root@turris:~# ./schnapps.sh upload 46 webdav://turris:passs8888888@dav.whatever.net:5006 /NetBackup/turris/
invalid URL
Can't access remote filesystem
But, when I run it with sh -x, there is indeed weird URL used:
mount.davfs https://turris:passs8888888@dav.whatever.net:5006 /mnt/.remote-snapshots -o 'dir_mode=0700,file_mode=0600,uid=root,gid=root,conf=/tmp/tmp.DcjNOP/dav-config'
looks it well parse username & password, but did not remove it from final URL to connect using mount.davfs.
Actually, I just hit the same problem. I've had functional configuration also with port number and it stopped working after cca 13th November when one of TOS3 updates, the 13th November is last snapshot I do have on webdav. I had some issue with migration to TOS5 on 1.0 Turris and when I solved those, I wanted to upload new snaps and something what used to be working now didn't.
I'm using non-standard port and maybe it's reason why it's not working?
root@turris:~# schnapps upload 46 webdav://turris:ABCabc789@dav.whatever.net:5006 /NetBackup/turris/
invalid URL
Can't access remote filesystem
Even config in /etc/conf/schnapps was working in past, but not now:
config remote 'remote'
option url 'webdav://dav.whatever.net:5006/'
option path '/NetBackup/turris'
option user 'turris'
option password 'ABCabc789'
option sync_types 'single,time'
Schnapps version 2.7.1