Hardware: Old laptop or computer YunoHost version: 11.0.10.2 I have access to my server : Through SSH | through the webadmin Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
Description of my issue
Hello, I have a PC server running a PC version of NextcloudPi. The architecture is as follows:
1 SSD on which runs an image of NextcloudPi
1 HDD of 8TB filled to more than half and on which the data of the Nextcloud user accounts are stored (on /media/Data)
Lately, NextcloudPi has some problems (port 80 and 443 closed when they are actually open, or connection problems via MacOS, etc.). By searching carefully, I understood that the PC version of NexcloudPi was not maintained for a long time (only ARM are).
Being satisfied with Yunohost on my other server, I would like to replace the NextcloudPi on my SSD with a Yunohost OS + the Nextcloud application.
How do I replace the OS on the SSD without having to migrate the ~5TB of data? Thanks!
Make an image of your SSD, and store it safely on the HDD for example. Who knows what might go wrong…
If you use /etc/fstab to mount your HDD, save the line corresponding to its mountpoint.
Install YunoHost on the SSD.
Perform the postinstall, make sure your admin username is the same as the one on the Nextcloud instance and re-create the standard Nextcloud users with the same usernames (easier for keeping permissions the same)
Mount your HDD:
Restore the line in /etc/fstab, recreate the mountpoint with sudo mkdir /media/Data then sudo mount /media/Data, or follow any Debian tutorial.
Install the Nextcloud app.
Follow the instructions there Nextcloud | Yunohost Documentation, starting with the nano /var/www/nextcloud/config/config.php command to tweak datadirectory. The idea is to put the path of the data directory on your HDD. For example this is what the directory looks like on my instance:
ls /home/yunohost.app/nextcloud/data
appdata_SomeString index.html user1
files_external nextcloud.log user2
Restore the database: mysql -B nextcloud < /media/Data/nextcloud-sqlbkp.bak
Hello and thank you very much for your kind help. When you say the above, do you mean the Yunohost admin username shall match the Nextcloud admin username, did I understood well ? Thank you
Thank you ! Last but not least, there is a GUI panel to make backups, can I use it instead of command line (because I am not familiar with SQL and I don’t know exactly what [db_name] correspond to) ? :
I guess so, yes. Though keep the “Include data” unchecked.
Put the file in the /media/Data directory.
I have no idea how you can restore it afterwards though.
If you need to provide its path, after installation of Nextcloud, make sure it has access to it with sudo chown nextcloud:nextcloud /media/Data/THE_FILE.