Nextcloud - upgrade to 13.0beta1

Published on Author admin

Upgrading Nextcloud from CLI on Linux system with systemd.

/var/www/html/owncloud/ - Nextcloud installation directory
apache - HTTP server service user

cd /var/www/html/
wget https://download.nextcloud.com/server/prereleases/nextcloud-13.0.0beta1.zip
systemctl stop httpd
rm owncloud-old/ -rf
mv owncloud/ owncloud-old/
unzip nextcloud-13.0.0beta1.zip
mv nextcloud/ owncloud/
mv owncloud-old/data/ owncloud/data/
cp owncloud-old/config/config.php owncloud/config/config.php
chown apache: owncloud/ -R

chcon -R -t httpd_sys_rw_content_t /data/var/www/html/owncloud/config
chcon -R -t httpd_sys_rw_content_t /data/var/www/html/owncloud/config/*
chcon -R -t httpd_sys_rw_content_t /data/var/www/html/owncloud/.htaccess
chcon -R -t httpd_sys_rw_content_t /data/var/www/html/owncloud/.user.ini
chcon -R -t httpd_sys_rw_content_t /data/var/www/html/owncloud/apps
chcon -R -t httpd_sys_rw_content_t /data/var/www/html/owncloud/apps/*
chcon -R -t httpd_sys_rw_content_t /data/var/www/html/owncloud/config
chcon -R -t httpd_sys_rw_content_t /data/var/www/html/owncloud/config/*
chcon -R -t httpd_sys_rw_content_t /data/var/www/html/owncloud/.htaccess
chcon -R -t httpd_sys_rw_content_t /data/var/www/html/owncloud/.user.ini
chcon -R -t httpd_sys_rw_content_t /data/var/www/html/owncloud/apps
chcon -R -t httpd_sys_rw_content_t /data/var/www/html/owncloud/apps/*
chcon -R -t httpd_sys_rw_content_t /data/var/www/html/owncloud/config/*

cd owncloud
sudo -u apache php occ upgrade
systemctl start httpd