Remonter des appli YNST sur un autre serveur

got it!

admin@plouf:/home/yunohost.app$ ls
nextcloud
admin@plouf:/home/yunohost.app$ sudo du -hs
48G .
admin@plouf:/home/yunohost.app$

So… I’ve removed the Nextcloud app from de Webadmin but it’s still there…
How can I free the space in ordre to be able to restore?

Bon… avec un petit

sudo rm -Rf nextcloud

j’ai réussi à libérer la place nécessaire. Est-ce normal qu’une appli supprimée via la webadmin reste ainsi à occuper de l’espace disque ?

Suite à ça j’ai réussi à réinstaller la bonne sauvegarde… par contre (oui, il y a encore un pb) impossible d’installer OnlyOffice, j’ai copié le log ici :
https://paste.yunohost.org/raw/fafayadate

Merci d’avance pour le coup de main : là suite à la mise à jour en Nextcloud 22.2 et à la réinstallation d’OnlyOffice j’ai clairement perdu certains documents (des doc collaboratifs sont retournés à des versions bien antérieures ou sont carrément vides). Je croyais que supprimer l’application OnlyOffice ne supprimait que l’applicatif mais visiblement ça vire également des données :frowning:

Sympa le lien du log (fafayadate) :joy:
Petite question, les 2 vps ont la même config ? La ram et le swap des 2 ?
Je suis pas très calé, mais dans le log il y a nginx killed. C’est qu’il n’y a plus assez de mémoire.
Sinon, c’est pas cool d’avoir perdu des données au cours du transfert.

VPS1 a :
3,9 GiB de RAM
4 GiB de SWAP

VPS2 a
7,6 GiB de RAM
pas de SWAP

Ceci étant, je ne réussis pas non plus à réinstaller OnlyOffice sur VPS1…

Si je réussis à remonter cette sauvegarde je n’aurais perdu que le travail d’une semaine sur 4 ou 5 documents, ça reste supportable. Sinon, je n’ai pas encore fait l’état complet des dégâts mais c’est de l’ordre de 2 ou 3 mois d’historique :(((

As tu essayé d’installer onlyoffice au lieu de restaurer la sauvegarde ?

J’ai l’impression que c’est ça qui a causé le pb de départ justement : mon Nextcloud en 22.2 ne démarrait plus Onlyoffice. J’ai donc supprimé et réinstallé l’appli (suite à l’idée donnée ici) et c’est après que je me suis rendu compte que des documents étaient totalement vide ou avaient perdus leurs modifications collaboratives.
Peut-être que je me trompe totalement, mais j’ai l’impression qu’Onlyoffice server a une partie “données”. Est-ce que qq’un qui connait bien le fonctionnement de ces outils pourrait le confirmer ou me dire que je fais totalement fausse route et que l’appli Onlyoffice n’est que l’appli ?

Il y a apparemment un problème de perte de données avec le combo nextcloud onlyoffice

Hum… c’est censé me rassurer ? :slight_smile: pfff… je vais me faire descendre par le reste de l’équipe ici… J’aimerai bien réussir à restaurer ma sauvegarde, ça me semble jouable ça.

Ce qu’il s’est passé: tu as restauré une ancienne sauvegarde de nextcloud puis tu as supprimé nextcloud MAIS les données n’ont pas été supprimée, car l’option --purge lors d ela suppression des apps vient juste d’apparaître en 4.3. Du coup tu n’avais pas assez d’espace disque pour restaurer la sauvegarde plus récente.

Tu as depuis fait une suppression du dossier /home/yunohost.app/nextcloud, tu devrais donc pouvoir désormais restaurer ta sauvegarde plus récente.

Ah… merci pour l’explication concernant la place @ljf
En fait je ne m’étais pas trompé de sauvegarde : apparemment le pb viendrait du fait qu’une partie des données sont dans Onlyoffice.
As-tu des idées sur comment je peux restaurer correctement Onlyoffice et Nextcloud ?
(Nextcloud, c’est bon, mais Onlyoffice, ça plante. Est-ce le manque de SWAP ?)

I don’t know anything about Onlyoffice, but read this:

No idea what portal files are :stuck_out_tongue: It is a reply to someone not wanting Onlyoffice to save data ‘locally’, but everything in a ‘cloud’. If there are no adaptions by the Yunohost-team, then I would check /var/www/onlyoffice/Data on VPS1.

I think so; with SWAP, Linux can put a brake on memory usage when SWAP is being used; without SWAP, there seems to be no safeguard and the process is killed when more than available RAM is claimed.

On my (small) VPS (1G RAM) I made a swap file because processes randomly crashed,

$ sudo fallocate -l 512M /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile

and add it to fstab,

# cat /etc/fstab |grep swap
/swapfile           none            swap    sw      0       0

The crashes don’t appear anymore. A separate partition would be better, but this was easier on the installed and running server.

thks @wbk
I have 2 questions in ordre to understand how to create the swap:
• is there a place to type fallocate? directly on /home ?
• how do I add it to fstab ? Is there a config file to edit?

No problem :stuck_out_tongue: (of course!)

Easiest is maybe

sudo cp /etc/fstab /etc/fstab.org
sudo echo '/swapfile           none            swap    sw      0       0'  >> /etc/fstab 

Pay attention to the double >>, to add it to the file (instead of overwrite the contents).

After that compare the result with the original

$ sudo cat /etc/fstab.old
...
$ sudo cat /etc/fstab

There should be a bunch of lines identical, and at the bottom of the second there should be the new line

Hum…
I got :

chmod: changing permissions of ‘/swapfile’: Operation not permitted

and:

sudo echo ‘/swapfile none swap sw 0 0’ >> /etc/fstab
-bash: /etc/fstab: Permission denied

hm, strange. What do you get when you run

$ mount

There should be a list with all mounted (virtual) filesystems. Look for a line that has .... on / type ... (rw...) or .... on /etc/ type .... (rw ...)
The line for me looks like

/dev/vda1 on / type ext4 (rw,relatime)

In your case, is it rw or r (read only)?

Everything looks ok:

sda1 on / type ext4 (rw,realtime,errors=remount -ro)

I read a post by someone who was unable to change a file as root, there the solution was

I would suspect that that is not the case, because you just created /swapfile ; you could install Yunohost (and run updates), so a totally read only filesystem seems not the case for sure.

I don’t know when errors=remount -ro comes into effect: if ‘out of memory’ is enough of an error, than the filesystem might be read only. Can you make other changes to files in / or /etc ?

Is it an option to reboot the server, and try again?

I highly doubt that this has anything to do with swap …

The restore log from onlyoffice is pretty clear :

WARNING - Nov 07 19:35:22 nginx[23982]: nginx: [emerg] open() "/etc/nginx/includes/ds-example.conf" failed (2: No such file or directory) in /etc/nginx/conf.d/ds.conf:7

This is related to the fact that onlyoffice (or rather document server .deb package) was written with the gentlesness of a catapult, and devs thought it’s a good idea to inject some nginx conf file during the .deb installation, and perform an nginx restart

For some reason, and according to @adepetigny, this works during a fresh install, but not during the restore of the app (despite the .deb being in both case the same)

Don’t know why that’s happening, but those were my conclusions so far

Thks for your feedbacks @wbk and @Aleks
after restarting the server I got the same denied to create the line in the fstab

If the the swap is not the problem, I’m wondering what are my options now in order to mount my backups…