NethServer Version: NethServer 7.8.2003 Module: nextcloud 19.0.3.1
hello, trying to migrate my nas/router setup to nethserver. i am currently playing around on a test machine trying to get nextcloud up and running. which it is. installing it was quite easy
database: is there a migration guide which i could not find? had issues with keys being too long. solved it with sudo mysql -u root -p use nextcloud; set global innodb_large_prefix=on; set global innodb_file_format=Barracuda;
which fixed it the error submitting the next command mysql -h localhost -u admin -pPASS nextcloud < /mnt/tank/system/backup/nextcloud/nextcloud-sqlbkp_DATE.bak
but it seems my admin/user passwords dont work anymore… even tough i see two users displayed in the neth nextc. admin panel.
can someone point me in the right direction on how one migrates a sql backup?
thanks, philip
admin user under system->users? nope never touched that. nextcloud with my user name and admin user were working before i imported the db. the mysql import process worked. -pPASS was without a space
so my basic approach was correct?
empty nextcloud database that neth created
set it to barracuda
import the backup into the nextcloud db
ill play around with it again in a couple of hours…
hmm… wish there would be a nextcloud migration guide out there for nethserver… seems like nethserver is taking over user managment for nextc.?
still cant login after importing nextclouds database. i can however create a new user with occ and that login works then. just not for the user that is in the db that i am importing.
i have not read up on that ldap user managment thing. thought i dont need it cause its just my small server for myself. is that thing controlling nextcloud users? anyways i activated it and created my username… did not change much
any help would be nice. thanks phil
Sorry for late answer. NethServer autoconfigures the LDAP/AD users in Nextcloud.
How many users do you have?
I think best way is to create/import the users to NethServer LDAP/AD and copy the files afterwards and let NC scan for files.
hey, its just me - one user. im ok with scanning / copying over the user files. but how do i import my exisiting centos8, nextcloud 19 mariadb with my current username?
importing the db in the terminal completes without errors, but somehow looses the password along the process, so that i cant login.
but that just creates a empty nextcloud instance without any user data, right? by copying the files, are you referring to my files stored in nextc.? thats fine i could just copy them over inside nc user interface. i am talking bout all the user data stored in the db. contacts, news feeds etc.
The admin user from the command is a mysql user you created? NethServer configures Nextcloud with mysql user named nextcloud (you can find the info in the dbuser and dbpassword settings form /usr/share/nextcloud/config/config.php, password can also be found at /var/lib/nethserver/secrets/nextcloud)
If you install an account provider (AD/LDAP), yes. Haven’t tried but I think in such scenario both AD/LDAP users and native nextcloud users can coexist as long as usernames/user_ids do not clash, but it can become a mess when usernames collide.
Sorry, cannot confirm nor deny.
User data is under /var/lib/nethserver/nextcloud directory.
What is the name of the user that is not working? If it is admin it might be clashing with another user.
Related: backup and restore info from nextcloud manual.
You can export the calendar / contacts from nextcloud. If in doubt, use a Mac or Thunderbird, also to verify. Both can import / export CalDAV and CrdDAV very well. Export all contacts into one vCard, same with Calendar data. Then reimport.
awesome thanks - that worked! can log in with my user and db is serving the previous imported data.
so to recollect when i repeat that on the production machine.
install nc module
db drop & create
mysql -h localhost -u admin -pPASS -e “DROP DATABASE nextcloud”
mysql -h localhost -u admin -pPASS -e “CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci”
The admin user from the command is a mysql user you created?
actually i never created an admin account on ns. but there is a admin account inside the db that i am importing. so im not quite sure why that worked. ill switch admin with nextcloud the next time?
### import db
mysql -h localhost -u admin -p`PASS` nextcloud < /mnt/tank/system/backup/nextcloud/nextcloud-sqlbkp_`DATE`.bak
sudo mysql -u root -p
use nextcloud;
set global innodb_large_prefix=on;
set global innodb_file_format=Barracuda;
If you install an account provider (AD/LDAP), yes. Haven’t tried but I think in such scenario both AD/LDAP users and native nextcloud users can coexist as long as usernames/user_ids do not clash, but it can become a mess when usernames collide.
ill read up on that ldap thing. the only thing i know about that is it probably has something todo with user profle management or so… i am the only user on this machine. so do i really need that? the main purpose of this machine is to serve files, and since a couple of years nextcloud plus to stream music.
thanks all for the help!