Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Documenting how to add additional space [DOT NOT MERGE UNTIL CLARIFIED] #706

Draft
wants to merge 34 commits into
base: testing
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
06a9c07
Update manifest.toml
ericgaspar Apr 23, 2024
e5d224a
Auto-update READMEs
yunohost-bot Apr 23, 2024
89f4373
Merge branch 'testing' into 29.0.0
ericgaspar Apr 25, 2024
ded5039
Merge branch 'testing' into 29.0.0
ericgaspar Apr 26, 2024
3503f0e
add pre upgrade warning for NC 29
OniriCorpe Apr 26, 2024
6d0c2ce
update to PHP8.3
ericgaspar May 22, 2024
2b1d579
Auto-update READMEs
yunohost-bot May 22, 2024
7c9f968
Merge pull request #684 from YunoHost-Apps/29.0.0
ericgaspar May 23, 2024
cc263ec
Update manifest.toml
ericgaspar May 23, 2024
0d05a77
Auto-update READMEs
yunohost-bot May 23, 2024
1b66d7f
Fix space splitting in phpflags on install (#690)
lyynd Jun 1, 2024
c3ec387
Merge branch 'master' into testing
ericgaspar Jun 1, 2024
f6a8dc8
Auto-update READMEs
yunohost-bot Jun 1, 2024
652d6de
Update upgrade
ericgaspar Jun 2, 2024
253357a
Update manifest.toml
ericgaspar Jun 6, 2024
cc45b8e
Auto-update READMEs
yunohost-bot Jun 6, 2024
38c2ecc
Fix phpflags (#691)
tituspijean Jun 8, 2024
1ab6c01
Fix upgrade: php version is 8.3 starting from 29.x ? (#692)
alexAubin Jun 20, 2024
ef6d230
Update manifest.toml
ericgaspar Jun 20, 2024
6aa7821
Auto-update READMEs
yunohost-bot Jun 20, 2024
6870be0
Update tests.toml
ericgaspar Jun 20, 2024
336bc29
Merge branch 'testing' of https://github.com/YunoHost-Apps/nextcloud_…
ericgaspar Jun 20, 2024
25b828b
Merge branch 'master' into testing
ericgaspar Jun 20, 2024
89899fd
[autopatch] Do not delete logs on app removal (#697)
yunohost-bot Jun 23, 2024
2f0cfe5
[autopatch] Do not delete logs on app removal (#698)
yunohost-bot Jun 23, 2024
d848e73
29.0.3
ericgaspar Jun 25, 2024
e584e31
Auto-update READMEs
yunohost-bot Jun 25, 2024
26bfa59
Update remove
ericgaspar Jun 25, 2024
0a4b38f
Merge branch 'testing' of https://github.com/YunoHost-Apps/nextcloud_…
ericgaspar Jun 25, 2024
88fbb73
Indent
alexAubin Jun 27, 2024
f7c21e4
Fix again upgrade ending with Nextcloud being in PHP 8.2 ?
alexAubin Jun 27, 2024
b96736a
Auto-update READMEs
yunohost-bot Jun 27, 2024
5a69494
Create ADDITIONAL_STORAGE.fr.md
alexAubin Jul 11, 2024
b243ad9
Create ADDITIONAL_STORAGE.md
alexAubin Jul 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ It shall NOT be edited by hand.

# Nextcloud for YunoHost

[![Integration level](https://dash.yunohost.org/integration/nextcloud.svg)](https://dash.yunohost.org/appci/app/nextcloud) ![Working status](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/nextcloud.svg)](https://ci-apps.yunohost.org/ci/apps/nextcloud/) ![Working status](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg)

[![Install Nextcloud with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=nextcloud)

Expand All @@ -29,7 +29,7 @@ In addition to Nextcloud core features, the following are made available with th
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal


**Shipped version:** 29.0.2~ynh1
**Shipped version:** 29.0.3~ynh1

**Demo:** <https://demo.nextcloud.com/>

Expand Down
4 changes: 2 additions & 2 deletions README_es.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ No se debe editar a mano.

# Nextcloud para Yunohost

[![Nivel de integración](https://dash.yunohost.org/integration/nextcloud.svg)](https://dash.yunohost.org/appci/app/nextcloud) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg)
[![Nivel de integración](https://dash.yunohost.org/integration/nextcloud.svg)](https://ci-apps.yunohost.org/ci/apps/nextcloud/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg)

[![Instalar Nextcloud con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=nextcloud)

Expand All @@ -29,7 +29,7 @@ In addition to Nextcloud core features, the following are made available with th
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal


**Versión actual:** 29.0.2~ynh1
**Versión actual:** 29.0.3~ynh1

**Demo:** <https://demo.nextcloud.com/>

Expand Down
4 changes: 2 additions & 2 deletions README_eu.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ EZ editatu eskuz.

# Nextcloud YunoHost-erako

[![Integrazio maila](https://dash.yunohost.org/integration/nextcloud.svg)](https://dash.yunohost.org/appci/app/nextcloud) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg)
[![Integrazio maila](https://dash.yunohost.org/integration/nextcloud.svg)](https://ci-apps.yunohost.org/ci/apps/nextcloud/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg)

[![Instalatu Nextcloud YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=nextcloud)

Expand All @@ -29,7 +29,7 @@ In addition to Nextcloud core features, the following are made available with th
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal


**Paketatutako bertsioa:** 29.0.2~ynh1
**Paketatutako bertsioa:** 29.0.3~ynh1

**Demoa:** <https://demo.nextcloud.com/>

Expand Down
4 changes: 2 additions & 2 deletions README_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.

# Nextcloud pour YunoHost

[![Niveau d’intégration](https://dash.yunohost.org/integration/nextcloud.svg)](https://dash.yunohost.org/appci/app/nextcloud) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg)
[![Niveau d’intégration](https://dash.yunohost.org/integration/nextcloud.svg)](https://ci-apps.yunohost.org/ci/apps/nextcloud/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg)

[![Installer Nextcloud avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=nextcloud)

Expand All @@ -29,7 +29,7 @@ En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suiv
* Utilise l'adresse `/.well-known` pour la synchronisation CalDAV et CardDAV du domaine si aucun autre service ne l'utilise déjà - par exemple, Baïkal


**Version incluse :** 29.0.2~ynh1
**Version incluse :** 29.0.3~ynh1

**Démo :** <https://demo.nextcloud.com/>

Expand Down
4 changes: 2 additions & 2 deletions README_gl.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ NON debe editarse manualmente.

# Nextcloud para YunoHost

[![Nivel de integración](https://dash.yunohost.org/integration/nextcloud.svg)](https://dash.yunohost.org/appci/app/nextcloud) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg)
[![Nivel de integración](https://dash.yunohost.org/integration/nextcloud.svg)](https://ci-apps.yunohost.org/ci/apps/nextcloud/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg)

[![Instalar Nextcloud con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=nextcloud)

Expand All @@ -29,7 +29,7 @@ In addition to Nextcloud core features, the following are made available with th
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal


**Versión proporcionada:** 29.0.2~ynh1
**Versión proporcionada:** 29.0.3~ynh1

**Demo:** <https://demo.nextcloud.com/>

Expand Down
4 changes: 2 additions & 2 deletions README_zh_Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# YunoHost 上的 Nextcloud

[![集成程度](https://dash.yunohost.org/integration/nextcloud.svg)](https://dash.yunohost.org/appci/app/nextcloud) ![工作状态](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg)
[![集成程度](https://dash.yunohost.org/integration/nextcloud.svg)](https://ci-apps.yunohost.org/ci/apps/nextcloud/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg)

[![使用 YunoHost 安装 Nextcloud](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=nextcloud)

Expand All @@ -29,7 +29,7 @@ In addition to Nextcloud core features, the following are made available with th
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal


**分发版本:** 29.0.2~ynh1
**分发版本:** 29.0.3~ynh1

**演示:** <https://demo.nextcloud.com/>

Expand Down
111 changes: 111 additions & 0 deletions doc/ADDITIONAL_STORAGE.fr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
### Ajouter de l'espace à Nextcloud
La solution I. permet d'ajouter un lien vers un dossier local ou distant.
La solution II. permet de déplacer l'espace de stockage principal de Nextcloud.

#### I. Ajouter un espace de stockage externe

Paramètre => [Administration] Stockages externe.

En bas de la liste vous pouvez rajouter un dossier (Il est possible de définir un sous dossier en utilisant la convention `dossier/sousDossier`.)
Sélectionner un type de stockage et indiquez les informations de connexion demandées.
Vous pouvez restreindre ce dossier à un ou plusieurs utilisateurs nextcloud avec la colonne `Disponible pour`.
Avec l'engrenage vous pouvez autoriser ou interdire la prévisualisation et le partage des fichiers.
Enfin cliquer sur la coche pour valider le dossier.

#### II. Migrer les données de Nextcloud dans une partition plus grosse

**Remarque** : Ce qui suit suppose que vous avez un disque dur monté sur `/media/stockage`. Référez-vous à [cet article](/external_storage) pour préparer votre système.

**Remarque** : Remplacez `nextcloud` par le nom de son instance, si vous avez plusieurs apps Nextcloud installées.

Commencez par éteindre le serveur web avec la commande :
```bash
systemctl stop nginx
```

##### Choix de l'emplacement

**Cas A : Stockage vierge, exclusif à Nextcloud**

Pour l'instant seul root peut y écrire dans `/media/stockage` ; ce qui signifie que NGINX et Nextcloud ne pourront donc pas l'utiliser.

```bash
chown -R nextcloud:nextcloud /media/stockage
chmod 775 -R /media/stockage
```

**Cas B : Stockage partagé, données déjà présentes, données Nextcloud dans un sous-dossier**

Si vous souhaitez utiliser ce disque pour d'autres applications, vous pouvez créer un sous-dossier appartenant à Nextcloud.

```bash
mkdir -p /media/stockage/nextcloud_data
chown -R nextcloud /media/stockage/nextcloud_data
chmod 775 -R /media/stockage/nextcloud_data
```

##### Migrer les données

Migrez vos données vers le nouveau disque. Pour ce faire *(soyez patient, cela peut être long)* :

```bash
Cas A : cp -ir /home/yunohost.app/nextcloud /media/stockage
Cas B : cp -ir /home/yunohost.app/nextcloud /media/stockage/nextcloud_data
```

L'option `i` permet de vous demander quoi faire en cas de conflit de fichier, notamment si vous écrasez un ancien dossier de données Owncloud ou Nextcloud.
Pour vérifier que tout s'est bien passé, comparer ce qu'affichent ces deux commandes (le contenu doit être identique) :

```bash
ls -la /home/yunohost.app/nextcloud

Cas A : ls -al /media/stockage
Cas B : ls -al /media/stockage/nextcloud_data/nextcloud
```

##### Configurer Nextcloud

Pour informer Nextcloud de son nouveau répertoire, modifiez le fichier `/var/www/nextcloud/config/config.php` avec la commande :

```bash
nano /var/www/nextcloud/config/config.php
```

Cherchez la ligne :

```bash
'datadirectory' => '/home/yunohost.app/nextcloud/data',
```

Que vous modifiez :

```bash
CAS A : 'datadirectory' => '/media/stockage',
CAS B : 'datadirectory' => '/media/stockage/nextcloud_data/nextcloud/data',
```

Sauvegardez avec `ctrl+x` puis `y` ou `o` (dépend de la locale de votre serveur).

Relancez le serveur web :

```bash
systemctl start nginx
```

Ajouter le fichier .ocdata
```bash
CAS A : nano /media/stockage/.ocdata
CAS B : nano /media/stockage/nextcloud_data/nextcloud/data/.ocdata
```
Ajouter un espace au fichier pour pouvoir le sauvegarder

Sauvegardez avec `ctrl+x` puis `y` ou `o` (dépend de la locale de votre serveur).

Lancez un scan du nouveau répertoire par Nextcloud:

```bash
cd /var/www/nextcloud
sudo -u nextcloud php8.1 --define apc.enable_cli=1 files:scan --all
```

C'est terminé. À présent testez si tout va bien, essayez de vous connecter à votre instance Nextcloud, envoyer un fichier, vérifiez sa bonne synchronisation.
118 changes: 118 additions & 0 deletions doc/ADDITIONAL_STORAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
### Adding storage space

Solution I. allows you to add a link to a local or remote folder.
Solution II. allows to move the main storage space of Nextcloud.

#### I. Add an external storage space

Parameter =>[Administration] External storage.

At the bottom of the list you can add a folder (It is possible to define a subfolder using the `folder/subfolder` convention.)
Select a storage type and specify the requested connection information.
You can restrict this folder to one or more nextcloud users with the column `Available for`.
With the gear you can allow or prohibit previewing and file sharing.
Finally click on the check mark to validate the folder.

#### II. Migrate Nextcloud data to a larger partition

**Note**: The following assumes that you have a hard disk mounted on `/media/storage`. Refer to[this article](/external_storage) to prepare your system.

**Note**: Replace `nextcloud` with the name of its instance, if you have several Nextcloud apps installed.

First turn off the web server with the command:
```bash
systemctl stop nginx
```

##### Choice of location

**Case A: Blank storage, exclusive to Nextcloud**

For the moment only root can write to it in `/media/storage`, which means that NGINX and Nextcloud will not be able to use it.

```bash
chown -R nextcloud:nextcloud /media/storage
chmod 775 -R /media/storage
```

**Case B: Shared storage, data already present, Nextcloud data in a subfolder**

If you want to use this disk for other applications, you can create a subfolder belonging to Nextcloud.

```bash
mkdir -p /media/storage/nextcloud_data
chown -R nextcloud /media/storage/nextcloud_data
chmod 775 -R /media/storage/nextcloud_data
```

##### Migrate data

Migrate your data to the new disk. To do this *(be patient, it can take a long time)*:

```bash
Case A: cp -ia /home/yunohost.app/nextcloud /media/storage
Case B: cp -ia /home/yunohost.app/nextcloud /media/storage/nextcloud_data
```

The `i` option allows you to ask yourself what to do if there is a file conflict, especially if you overwrite an old Owncloud or Nextcloud data folder.
To check that everything went well, compare what these two commands display (the content must be identical):

```bash
ls -la /home/yunohost.app/nextcloud

Case A: ls -al /media/storage
Case B: ls -al /media/storage/nextcloud_data/nextcloud
```

##### Configure Nextcloud

To inform Nextcloud of its new directory, modify the `/var/www/nextcloud/config/config.php` file with the command:

```bash
nano /var/www/nextcloud/config/config.php
```

Look for the line:

```bash
'datadirectory' => '/home/yunohost.app/nextcloud/data',
```

That you modify:

```bash
CASE A:'datadirectory' =>'/media/storage',
CASE B:'datadirectory' =>'/media/storage/nextcloud_data/nextcloud/data',
```

Save it with `ctrl+x` then `y` or `o` (depending on your server locale).

Restart the web server:

```bash
systemctl start nginx
```

Add the.ocdata file
```bash
CASE A: nano /media/storage/.ocdata
CASE B: nano /media/storage/nextcloud_data/nextcloud/data/.ocdata
```
Add a space to the file to be able to save it

Back up with `ctrl+x` then `y` or `o` (depending on your server locale).

Run a scan of the new directory by Nextcloud:

```bash
cd /var/www/nextcloud
sudo -u nextcloud php8.1 --define apc.enable_cli=1 files:scan --all
```

Update the YunoHost setting, so automatic upgrades and backups know where the datadir is located:
```bash
Case A: yunohost app setting nextcloud datadir -v /media/storage
Case B: yunohost app setting nextcloud datadir -v /media/storage/nextcloud_data/nextcloud/data/
```

It's over now. Now test if everything is fine, try connecting to your Nextcloud instance, upload a file, check its proper synchronization.
6 changes: 3 additions & 3 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name = "Nextcloud"
description.en = "Online storage, file sharing platform and various other applications"
description.fr = "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"

version = "29.0.2~ynh1"
version = "29.0.3~ynh1"

maintainers = ["kay0u"]

Expand Down Expand Up @@ -66,8 +66,8 @@ ram.runtime = "512M"
[resources.sources]

[resources.sources.main]
url = 'https://download.nextcloud.com/server/releases/nextcloud-29.0.2.tar.bz2'
sha256 = '2d49d297dc340092021057823e8e78a312bc00f56de7d8677ac790590918ab17'
url = 'https://download.nextcloud.com/server/releases/nextcloud-29.0.3.tar.bz2'
sha256 = 'a5996e764c120927f8844d8f5b28c736b8e2f3280b120be13a2bd7731cdb7fd4'

[resources.sources.28]
url = 'https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2'
Expand Down
3 changes: 0 additions & 3 deletions scripts/remove
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ ynh_remove_nginx_config
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config

# remove logs
ynh_secure_remove --file="/var/log/$app"

# Remove the app-specific logrotate config
ynh_remove_logrotate

Expand Down
Loading