Is there an easy way to get the owncloud folder renamed to nextcloud without destroying everything? The main goal should be that the client does not redownload all the data stored in the folder owncloud/data.
secons question is: Is it a good idea to move the data folder out of the …cloud folder? and if how?
Wouldn’t it be better and simpler to do a fresh install of NC in /nextcloud/ and then copy /data/, /themes/ and /config.php from the old /owncloud/ directory?
And as I’m on gentoo and gentoo installs web-applications and updates in directories according to the name of the application, I had to rename it anyway
yeah, there is a risk with older systems. You only will run in problems when you have a ownCloud instance from 6.0 or older that you upgraded to Nextcloud. If you installed ownCloud 7, 8.x or later, you can just adjust the folder in your config.php file and you’re good. You could also create a link from ownCloud to Nextcloud, that is what I did - not sure if it fixes it but I haven’t had any issues and my install is from before oC 6.0
move owncloud directory (there will be no access, so no changes)
copy db_owncloud to db_nextcloud (using phpmyadmin and logging in MariaDB root account)
rename all table prefixes to tbl_ (instead of oc_) (because tbl is generic, in case of more name changes; this step takes the most time)
rename user of the old owncloud database using SQL (phpmyadmin):
RENAME USER ‘oc_admin’@’%’ TO ‘nc_admin’@’%’;
RENAME USER ‘oc_admin’@‘localhost’ TO ‘nc_admin’@‘localhost’;
Grant this renamed user privileges on new database using SQL (phpmyadmin):
GRANT ALL PRIVILEGES ON db_nextcloud.* TO ‘nc_admin’@’%’;
move owncloud data directory to new name
i.e. /opt/owncloud to /opt/nextcloud
downloaded nextcloud version 10.0.3 and checked md5
installed at location of old owncloud directory (step 1) with nextcloud as name and set the rights (chown -R)
got the old config.php copied to the new directory and changed accordingly, i.e.:
‘datadirectory’ => ‘/opt/nextcloud/data’,
‘dbname’ => ‘db_nextcloud’,
‘dbhost’ => ‘localhost’,
‘dbtableprefix’ => ‘tbl_’,
‘dbuser’ => ‘nc_admin’,
For migration to 11.0.1:
move nextclouddirectory (there will be no access, so no changes)
downloaded nextcloud version 11.0.1 and checked md5
installed at location of old nextcloud directory and set the rights (chown -R)
got the old config.php copied to the new directory
When everything is working, remove the old owncloud packages and any other traces like the backupped folders.
I changed my folder name to nextcloud now, would it be possible to set a soft link that keep old client settings working?
drwxr-xr-x 15 root www-data 4,0K Mai 7 09:30 nextcloud
lrwxrwxrwx 1 root root 9 Mai 7 09:24 owncloud -> nextcloud
I tried to do the same today, changing my symlink from /oc to /nc, but after this change I was not able to log in.
As far as I remember I changed paths in NC config.php and paths in my Apache config files. Anything else to change?
The error in NC log is this:
{“reqId”:“m1E81YlJIQ8QkrwX8C1N”,“level”:3,“time”:“2018-05-14T08:38:43+00:00”,“remoteAddr”:“192.168.100.201”,“user”:“–”,“app”:“index”,“method”:“GET”,“url”:“/nc/index.php”,“message”:“Exception: {"Exception":"Exception","Message":"The requested uri(\/nc\/login) cannot be processed by the script ‘\/oc\/index.php’)","Code":0,"Trace":"#0 \/var\/www\/nc13.0.2\/lib\/base.php(951): OC\\AppFramework\\Http\\Request->getRawPathInfo()\n#1 \/var\/www\/nc13.0.2\/index.php(37): OC::handleRequest()\n#2 {main}","File":"\/var\/www\/nc13.0.2\/lib\/private\/AppFramework\/Http\/Request.php","Line":733}”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0”,“version”:“13.0.2.1”}
Did you change the Nextcloud data directory or Nextcloud installation directory? I assume from the error message, you changed the installation directory from /var/www/oc to /var/www/nc?
Please post the content of your Nextcloud Apache config/vhost and /var/www/nc/config/config.php here, but be sure to anonymize and replace all domain, password and secret strings .
As within the error message old and new path infos seem to be mixed, there could be simply a browser cache issue: <ctrl>+<F5> to reload the page while dropping cache is at least worth to try first .
Thanks for your response.
My data directory is already outside the NC installation directory. I always install NC in a separate directory in /var/www and I point symlink /var/www/oc to it, not sure if it’s good or bad practice, but worked fine so far. Now I want to use /var/www/nc instead of /var/www/oc.
In Apache config I basically created a new nextcloud.conf by copy/pasting what I have for /oc and that works. But I also left the owncloud.conf in place as well, that should not be a problem right?
Apache nextcloud.conf:
Alias /nc "/var/www/nc/"
<Directory /var/www/nc/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nc
SetEnv HTTP_HOME /var/www/nc
</Directory>
In Nextcloud config.php I changed all /oc to /nc, I restarted Apache several times and also deleted cookies from my web browser and also tried web browser private mode, so should not be a browser issue.