Nextcloud Administration (Linux)
Aus Matts Wiki
In diesem Artikel werden diverse Administrations-Tätigkeiten beschrieben.
Command-Line-Administration
Einleitung
Das Programm occ aus der Nextcloud-Applikation ist ein PHP-Skript, und befindet sich daher im Nextcloud-Verzeichnis:
cd /var/www/html/nextcloud/
Zur Ausführung wird der PHP-Interpreter benötigt, und sollte im Kontext des Webserver-Users ausgeführt werden.
Der folgende Befehl listet alle möglichen occ-Befehle auf:
sudo -u www-data php occ
Ergebnis:
Usage:
help [options] [--] [<command_name>]
Arguments:
command The command to execute
command_name The command name [default: "help"]
Options:
--format=FORMAT The output format (txt, xml, json, or md) [default: "txt"]
--raw To output raw command help
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--no-warnings Skip global warnings, show command output only
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Hilfe zu einem Befehl ausgeben:
sudo -u www-data php occ help maintenance:mode
Status von Nextcloud ausgeben:
sudo -u www-data php occ status
Ergebnis:
- installed: true - version: 11.0.3.2 - versionstring: 11.0.3 - edition:
Wartungsmodus
Wartungsmodus aktivieren:
sudo -u www-data php occ maintenance:mode --on
Status des Wartungsmodus abrufen:
sudo -u www-data php occ maintenance:mode
Mögliches Ergebnis:
Nextcloud is in maintenance mode - no apps have been loaded Maintenance mode is currently enabled
Wartungsmodus deaktivieren:
sudo -u www-data php occ maintenance:mode --off
Upgrade
# cd /var/www/html/nextcloud/ # sudo -u www-data php occ upgrade
Bereinigung
Dateiversionen aller User bereinigen:
sudo -u www-data php occ versions:cleanup
Papierkorb aller User bereinigen:
sudo -u www-data php occ trashbin:cleanup --all-users
Papierkorb für die User Alice und Bob bereinigen:
sudo -u www-data php occ trashbin:cleanup Alice Bob
