# Upgrade NextCloud 211228447

**URL:** <https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162>\
**Category:** Existing Apps\
**Tags:** nextcloud\
**Created:** [12 January 2022 10:16 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162 "2022-01-12T10:16:08Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![pirboazo](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@pirboazo](https://syncloud.discourse.group/u/pirboazo)\
**Post date:** [12 January 2022 10:16 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/1 "2022-01-12T10:16:08Z")

</div>

Hello,  
I launch the upgrade of NextCloud 211228447 .

After several minutes the upgrade stop .

and the snap are inactive.

> nextcloud.nginx enabled inactive  
> nextcloud.php-fpm enabled inactive  
> nextcloud.postgresql enabled inactive

Nextcloud snap is allways the old version  
current → 211119415

find in /var/snap/nextcloud/common/log/nginx\_error.log 🙁

> 2022/01/12 10:50:09 [alert] 25072#0: unlink() “/var/snap/nextcloud/common/log/nginx.pid” failed (2: No such file or directory)

the syncloud app is in this state

 ![NextCloud-syncloud](https://global.discourse-cdn.com/free1/uploads/syncloud/original/1X/4116dd073dea0ddbf0859597c6b1945b7dc7d332.jpeg)

what do now?

Pierre

---

<div class="post-metadata">

**Author:** ![pirboazo](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@pirboazo](https://syncloud.discourse.group/u/pirboazo)\
**Post date:** [12 January 2022 11:59 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/2 "2022-01-12T11:59:21Z")

</div>

I run the command "snap refresh nextcloud.

> root@syncloud:/var/snap/nextcloud/common# snap refresh nextcloud  
> error: cannot perform the following tasks:

- Run pre-refresh hook of “nextcloud” snap if present (run hook “pre-refresh”:

* * *

2022-01-12 12:54:34,676 - database - INFO - postgres executing: snap run nextcloud.pgdumpall -f /var/snap/nextcloud/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/nextcloud/current/database/.s.PGSQL.5436”?  
2022-01-12 12:54:35,036 - database - ERROR - postgres error:  
Traceback (most recent call last):  
File “/snap/nextcloud/211119415/meta/hooks/pre-refresh”, line 7, in   
Installer().pre\_refresh()  
File “/snap/nextcloud/211119415/hooks/installer.py”, line 90, in pre\_refresh  
self.db.backup()  
File “/snap/nextcloud/211119415/hooks/postgres.py”, line 52, in backup  
self.run(‘snap run nextcloud.pgdumpall -f {0}’.format(self.backup\_file))  
File “/snap/nextcloud/211119415/hooks/postgres.py”, line 62, in run  
raise e  
File “/snap/nextcloud/211119415/hooks/postgres.py”, line 58, in run  
output = check\_output(cmd, shell=True).decode()  
File “/snap/nextcloud/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/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py”, line 516, in run  
raise CalledProcessError(retcode, process.args,  
subprocess.CalledProcessError: Command ‘snap run nextcloud.pgdumpall -f /var/snap/nextcloud/current/database.dump’ returned non-zero exit status 1.  
-----)

---

<div class="post-metadata">

**Author:** ![pirboazo](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@pirboazo](https://syncloud.discourse.group/u/pirboazo)\
**Post date:** [12 January 2022 12:15 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/3 "2022-01-12T12:15:54Z")

</div>

The DB is down …  
Can i do start the DB before the command

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [12 January 2022 18:58 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/4 "2022-01-12T18:58:59Z")

</div>

I guess it is down for a reason, what is the output of:

```auto
df -h

```

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [12 January 2022 19:03 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/5 "2022-01-12T19:03:29Z")

</div>

You can start nextcloud by:

```auto
snap start nextcloud

```

Usually you never do this unless the reason it is down is fixed now.

---

<div class="post-metadata">

**Author:** ![pirboazo](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@pirboazo](https://syncloud.discourse.group/u/pirboazo)\
**Post date:** [13 January 2022 12:05 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/6 "2022-01-13T12:05:22Z")

</div>

Hi boris

> df -h  
> Filesystem Size Used Avail Use% Mounted on  
> /dev/root 15G 7.4G 6.3G 55% /  
> devtmpfs 1.8G 0 1.8G 0% /dev  
> tmpfs 2.0G 0 2.0G 0% /dev/shm  
> tmpfs 2.0G 204M 1.8G 11% /run  
> tmpfs 5.0M 0 5.0M 0% /run/lock  
> tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup  
> /dev/loop0 530M 530M 0 100% /snap/rocketchat/190609478  
> /dev/loop7 30M 30M 0 100% /snap/users/20071264  
> /dev/sda1 220G 43G 166G 21% /opt/disk/external  
> /dev/loop9 43M 43M 0 100% /snap/bitwarden/21032862  
> /dev/loop10 93M 93M 0 100% /snap/users/210524196  
> /dev/loop11 207M 207M 0 100% /snap/nextcloud/210528234  
> /dev/loop6 283M 283M 0 100% /snap/nextcloud/210624280  
> /dev/loop2 151M 151M 0 100% /snap/platform/2110031074  
> /dev/loop3 151M 151M 0 100% /snap/platform/2110221095  
> /dev/loop4 424M 424M 0 100% /snap/nextcloud/211119415  
> /dev/loop1 147M 147M 0 100% /snap/platform/1203

---

<div class="post-metadata">

**Author:** ![pirboazo](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@pirboazo](https://syncloud.discourse.group/u/pirboazo)\
**Post date:** [13 January 2022 12:07 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/7 "2022-01-13T12:07:31Z")

</div>

snap start nextcloud  
error: cannot perform the following tasks:

- start of [nextcloud.nginx nextcloud.php-fpm nextcloud.postgresql] (# systemctl start snap.nextcloud.nginx.service snap.nextcloud.php-fpm.service snap.nextcloud.postgresql.service  
Job for snap.nextcloud.postgresql.service failed because the control process exited with error code.  
See “systemctl status snap.nextcloud.postgresql.service” and “journalctl -xe” for details.  
Job for snap.nextcloud.php-fpm.service failed because the control process exited with error code.  
See “systemctl status snap.nextcloud.php-fpm.service” and “journalctl -xe” for details.  
)
- start of [nextcloud.nginx nextcloud.php-fpm nextcloud.postgresql] (exit status 1)  
root@syncloud:~#

---

<div class="post-metadata">

**Author:** ![pirboazo](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@pirboazo](https://syncloud.discourse.group/u/pirboazo)\
**Post date:** [13 January 2022 12:13 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/8 "2022-01-13T12:13:57Z")

</div>

> systemctl status snap.nextcloud.php-fpm.service  
> ● snap.nextcloud.php-fpm.service - Service for snap application nextcloud.php-fpm  
> Loaded: loaded (/etc/systemd/system/snap.nextcloud.php-fpm.service; enabled; vendor preset: enabled)  
> Active: failed (Result: exit-code) since Thu 2022-01-13 13:06:13 CET; 6min ago  
> Process: 3229 ExecStart=/usr/bin/snap run nextcloud.php-fpm (code=exited, status=70)

Jan 13 13:06:13 syncloud systemd[1]: snap.nextcloud.php-fpm.service: Service RestartSec=100ms expired, scheduling restart.  
Jan 13 13:06:13 syncloud systemd[1]: snap.nextcloud.php-fpm.service: Scheduled restart job, restart counter is at 5.  
Jan 13 13:06:13 syncloud systemd[1]: Stopped Service for snap application nextcloud.php-fpm.  
Jan 13 13:06:13 syncloud systemd[1]: snap.nextcloud.php-fpm.service: Start request repeated too quickly.  
Jan 13 13:06:13 syncloud systemd[1]: snap.nextcloud.php-fpm.service: Failed with result ‘exit-code’.  
Jan 13 13:06:13 syncloud systemd[1]: Failed to start Service for snap application nextcloud.php-fpm.  
root@syncloud:~#

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [13 January 2022 20:53 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/9 "2022-01-13T20:53:25Z")

</div>

```auto
journalctl -ru snap.nextcloud.postgresql.service

```

---

<div class="post-metadata">

**Author:** ![pirboazo](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@pirboazo](https://syncloud.discourse.group/u/pirboazo)\
**Post date:** [14 January 2022 08:38 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/10 "2022-01-14T08:38:25Z")

</div>

you wil find the log here : [CryptPad](https://cryptpad.fr/file/#/2/file/xK+hq7DN3SV+HDYAefbeTxwf/)

> bad weather ☹

I found this : [PostgreSQL: Re: PANIC: replication checkpoint has wrong magic 0 instead of …??](https://www.postgresql.org/message-id/CA%2BXUKciJpR-Wxt2irzjToYisMMPnoZA7Mc3h-CUf56JtJEsvAQ%40mail.gmail.com)

Cheers

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [14 January 2022 09:34 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/11 "2022-01-14T09:34:03Z")

</div>

OK, I guess the simplest option is to remove it and install again then there will be no upgrade issue, I understand this is not the best option but there were few issues fixed in the latest version which may cause this.  
After remove/install you will have latest version will lose settings like calendar/contacts but all the files will stay but you may need to tell Nextcloud to scan them with:

```auto
snap run nextcloud.occ files:scan --all

```

> **[Nextcloud · syncloud/platform Wiki](https://github.com/syncloud/platform/wiki/Nextcloud#file-scan)**
>
> Run popular services on your device with one click - Nextcloud · syncloud/platform Wiki

---

<div class="post-metadata">

**Author:** ![pirboazo](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@pirboazo](https://syncloud.discourse.group/u/pirboazo)\
**Post date:** [14 January 2022 09:41 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/12 "2022-01-14T09:41:29Z")

</div>

OK

Remove since the platform web UI ?

But before i test if the DB restart after apply this work around.

> Just moving away to somewhere else  
> $PG\_DATA/pg\_logical/replorigin\_checkpoint

I do that during the week-end.  
Thanks.  
Pierre

---

<div class="post-metadata">

**Author:** ![pirboazo](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@pirboazo](https://syncloud.discourse.group/u/pirboazo)\
**Post date:** [16 January 2022 17:21 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/13 "2022-01-16T17:21:27Z")

</div>

Hello Boris ,

I found the issue with my installation.

It’s the hardware.

The SD card is not READ ONLY but the file system have several problem.

Yesterday i install rclone to backup platform/backup directory from external disk to infomaniak.  
it was ok …

I don’t remenber why , i rebooted the Rapsberrypi .

i saw than the nextcloud was up !!! 🙂  
but rclone was not installed ☹

Data are write in cache but not on the SD card.

☹  
In first time i restore a SD on new card.  
And i lookup on your site the Syncloud H seems enough for me. but do you have a solution where the boot disk will not SD card.

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [16 January 2022 20:27 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/14 "2022-01-16T20:27:07Z")

</div>

Syncloud R uses sd card for the whole OS and that is why it is called Starter.  
Syncloud H uses sd card just for kernel boot and can be easily replaced if corrupted as it is “readonly” boot storage.  
Syncloud N does not use sd card at all.

---

<div class="post-metadata">

**Author:** ![pirboazo](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@pirboazo](https://syncloud.discourse.group/u/pirboazo)\
**Post date:** [17 January 2022 16:27 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/15 "2022-01-17T16:27:04Z")

</div>

Hi Boris  
On syncloud H where are store the snap directory ?

it’s S or N ? I don’t see description pour Syncloud S.

Pierre

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [17 January 2022 20:23 UTC](https://syncloud.discourse.group/t/upgrade-nextcloud-211228447/162/16 "2022-01-17T20:23:47Z")

</div>

> On syncloud H where are store the snap directory ?

On internal SSD disk which is used to store operation system files as well as snaps.

> it’s S or N ? I don’t see description pour Syncloud S.

Sorry N, S is discontinued for now.
