I think this worked:
root@syncloud:/snap/platform/current/bin# bash upgrade-snapd.sh stable
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3 100 3 0 0 5 0 --:--:-- --:--:-- --:--:-- 5
--2023-05-08 13:43:29-- http://apps.syncloud.org/apps/snapd-361-armhf.tar.gz
Resolving apps.syncloud.org (apps.syncloud.org)... 52.92.227.11, 52.92.210.91, 52.218.180.114, ...
Connecting to apps.syncloud.org (apps.syncloud.org)|52.92.227.11|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 30727445 (29M) [application/gzip]
Saving to: 'snapd-361-armhf.tar.gz'
0K ........ ........ ........ ..... 100% 3.77M=7.8s
2023-05-08 13:43:37 (3.77 MB/s) - 'snapd-361-armhf.tar.gz' saved [30727445/30727445]
snapd/
snapd/bin/
snapd/bin/snap-exec
snapd/bin/snapctl
snapd/bin/unsquashfs
snapd/bin/snap-discard-ns
snapd/bin/snap-repair
snapd/bin/mksquashfs
snapd/bin/snap-update-ns
snapd/bin/snap-seccomp
snapd/bin/snapd
snapd/bin/snap-confine
snapd/bin/snap
snapd/conf/
snapd/conf/snapd.service
snapd/conf/snapd.socket
snapd/lib/
snapd/lib/libseccomp.so.2
snapd/lib/libseccomp.so
snapd/lib/libseccomp.so.2.3.3
snapd/scripts/
snapd/scripts/prepare.sh
No effect on snap list
:
root@syncloud:/snap/platform/current/bin# snap list
Name Version Rev Tracking Developer Notes
core 16-2.58.3 14950 latest canonical core
files 158 158 latest syncloud -
grocy 34 34 latest syncloud -
nextcloud 676 676 latest syncloud -
platform 1905 1905 latest syncloud base
syncthing 103 103 latest syncloud -
users 272 272 latest syncloud -
The backup command still fails:
root@syncloud:/snap/platform/current/bin# ./cli backup create grocy
info backup/backup.go:125 Running backup create {"app": "grocy", "file": "/data/platform/backup/grocy-2023-0508-134551.tar.gz"}
info cli/executor.go:23 execute {"cmd": "/usr/bin/du -s /var/snap/grocy/current"}
info cli/executor.go:23 execute {"cmd": "/usr/bin/du -s /var/snap/grocy/common"}
info backup/backup.go:149 temp space left: 23127977984
info backup/backup.go:150 temp space needed: 88
info cli/executor.go:23 execute {"cmd": "/usr/bin/snap run grocy.backup-pre-stop"}
error snap/cli.go:47 snap failed {"command": "run", "error": "exit status 1: 2023-05-08 13:45:58,275 - database - INFO - postgres executing: snap run grocy.pgdumpall -f /var/snap/grocy/current/database.dump\npg_dumpall: could not connect to database \"template1\": could not connect to server: No such file or directory\n\tIs the server running locally and accepting\n\tconnections on Unix domain socket \"/var/snap/grocy/current/database/.s.PGSQL.5436\"?\n2023-05-08 13:45:58,720 - database - ERROR - postgres error:\nTraceback (most recent call last):\n File \"/snap/grocy/34/hooks/backup-pre-stop\", line 4, in <module>\n Installer().backup_pre_stop()\n File \"/snap/grocy/34/hooks/installer.py\", line 127, in backup_pre_stop\n self.pre_refresh()\n File \"/snap/grocy/34/hooks/installer.py\", line 76, in pre_refresh\n self.db.backup()\n File \"/snap/grocy/34/hooks/postgres.py\", line 45, in backup\n self.run('snap run grocy.pgdumpall -f {0}'.format(self.backup_file))\n File \"/snap/grocy/34/hooks/postgres.py\", line 55, in run\n raise e\n File \"/snap/grocy/34/hooks/postgres.py\", line 51, in run\n output = check_output(cmd, shell=True).decode()\n File \"/snap/grocy/current/python/usr/local/lib/python3.8/subprocess.py\", line 415, in check_output\n return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,\n File \"/snap/grocy/current/python/usr/local/lib/python3.8/subprocess.py\", line 516, in run\n raise CalledProcessError(retcode, process.args,\nsubprocess.CalledProcessError: Command 'snap run grocy.pgdumpall -f /var/snap/grocy/current/database.dump' returned non-zero exit status 1.\n"}
github.com/syncloud/platform/snap.(*Cli).run
/drone/src/backend/snap/cli.go:47
github.com/syncloud/platform/snap.(*Cli).Run
/drone/src/backend/snap/cli.go:30
github.com/syncloud/platform/snap.(*Cli).RunCmdIfExists
/drone/src/backend/snap/cli.go:36
github.com/syncloud/platform/backup.(*Backup).Create
/drone/src/backend/backup/backup.go:164
main.backupCmd.func1.1
/drone/src/backend/cmd/cli/backup.go:27
reflect.Value.call
/usr/local/go/src/reflect/value.go:556
reflect.Value.Call
/usr/local/go/src/reflect/value.go:339
github.com/golobby/container/v3.Container.Call
/go/pkg/mod/github.com/golobby/container/v3@v3.3.1/container.go:206
main.backupCmd.func1
/drone/src/backend/cmd/cli/backup.go:25
github.com/spf13/cobra.(*Command).execute
/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850
github.com/spf13/cobra.(*Command).ExecuteC
/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958
github.com/spf13/cobra.(*Command).Execute
/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895
main.main
/drone/src/backend/cmd/cli/main.go:25
runtime.main
/usr/local/go/src/runtime/proc.go:250
Error: exit status 1: 2023-05-08 13:45:58,275 - database - INFO - postgres executing: snap run grocy.pgdumpall -f /var/snap/grocy/current/database.dump
pg_dumpall: could not connect to database "template1": could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/snap/grocy/current/database/.s.PGSQL.5436"?
2023-05-08 13:45:58,720 - database - ERROR - postgres error:
Traceback (most recent call last):
File "/snap/grocy/34/hooks/backup-pre-stop", line 4, in <module>
Installer().backup_pre_stop()
File "/snap/grocy/34/hooks/installer.py", line 127, in backup_pre_stop
self.pre_refresh()
File "/snap/grocy/34/hooks/installer.py", line 76, in pre_refresh
self.db.backup()
File "/snap/grocy/34/hooks/postgres.py", line 45, in backup
self.run('snap run grocy.pgdumpall -f {0}'.format(self.backup_file))
File "/snap/grocy/34/hooks/postgres.py", line 55, in run
raise e
File "/snap/grocy/34/hooks/postgres.py", line 51, in run
output = check_output(cmd, shell=True).decode()
File "/snap/grocy/current/python/usr/local/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/snap/grocy/current/python/usr/local/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'snap run grocy.pgdumpall -f /var/snap/grocy/current/database.dump' returned non-zero exit status 1.
Usage:
cli backup create [app] [flags]
Flags:
-h, --help help for create
Global Flags:
--system-config string system config file (default "/snap/platform/current/config/platform.cfg")
--user-config string user config sqlite db (default "/var/snap/platform/current/platform.db")
exit status 1: 2023-05-08 13:45:58,275 - database - INFO - postgres executing: snap run grocy.pgdumpall -f /var/snap/grocy/current/database.dump
pg_dumpall: could not connect to database "template1": could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/snap/grocy/current/database/.s.PGSQL.5436"?
2023-05-08 13:45:58,720 - database - ERROR - postgres error:
Traceback (most recent call last):
File "/snap/grocy/34/hooks/backup-pre-stop", line 4, in <module>
Installer().backup_pre_stop()
File "/snap/grocy/34/hooks/installer.py", line 127, in backup_pre_stop
self.pre_refresh()
File "/snap/grocy/34/hooks/installer.py", line 76, in pre_refresh
self.db.backup()
File "/snap/grocy/34/hooks/postgres.py", line 45, in backup
self.run('snap run grocy.pgdumpall -f {0}'.format(self.backup_file))
File "/snap/grocy/34/hooks/postgres.py", line 55, in run
raise e
File "/snap/grocy/34/hooks/postgres.py", line 51, in run
output = check_output(cmd, shell=True).decode()
File "/snap/grocy/current/python/usr/local/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/snap/grocy/current/python/usr/local/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'snap run grocy.pgdumpall -f /var/snap/grocy/current/database.dump' returned non-zero exit status 1.