Migrare da owncloud a nextcloud
Nextcloud è un fork do owncloud. OC è un progetto open source di file sharing con un ecosistema di apps (es. calendar, contact, ecc…) fornite da una comunity, mentre l’obbiettico di nextcloud è fornire questi servizi inclusi nella suite anche per la versione comunity.
Attualmente è possibile migrare da un progetto all’altro con queste relazioni di versione:
- Da ownCloud 9.0 a Nextcloud 9
- Da ownCloud 9.0 a Nextcloud 10
- Da ownCloud 9.1 a Nextcloud 10
Ecco una piccola guida per passare da owncloud a nextcloud:
- Scaricare la versione corretta in base alla nostra versione di owncloud.
- Fare il backup della cartella di owncloud:
[user]$ sudo mv /var/www/owncloud /var/www/oc-backup
- Estrarre e rinominare la cartella di nexcloud in owncloud.
- Copiare la cartella config dal backup che abbiamo fatto alla nuova cartella owncloud.
- Eseguire questo script per impostare i permessi correttamente:
#!/bin/bash
ocpath='/var/www/owncloud'
ocdatapath='/srv/data_cloud'
htuser='www-data'
htgroup='www-data'
rootuser='root' # On QNAP this is admin
echo "Set cloud perm"
find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640
find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750
echo "Set data perm"
find ${ocdatapath}/ -type d -print0 | xargs -0 chmod 0750
find ${ocdatapath}/ -type f -print0 | xargs -0 chmod 0640
echo "set user file cloud"
chown -R ${htuser}:${htgroup} ${ocpath}/
chown -R ${htuser}:${htgroup} ${ocpath}/apps/
chown -R ${htuser}:${htgroup} ${ocpath}/config/
chown -R ${htuser}:${htgroup} ${ocpath}/themes/
echo "set user file data"
chown -R ${htuser}:${htgroup} ${ocdatapath}
echo "set .haccess perm"
chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
chown ${rootuser}:${htgroup} ${ocdatapath}/.htaccess
chmod 0644 ${ocpath}/.htaccess
chmod 0644 ${ocdatapath}/.htaccess
- Eseguire l’update di owncloud con:
[user]$ sudo cd /var/www/owncloud
[user]$ sudo -u www-data php occ upgrade