Nextcloud on Dietpi v6.34.3 Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
cktechie
Posts: 37
Joined: Tue Jan 05, 2021 1:34 am

Re: Nextcloud on Dietpi v6.34.3

Post by cktechie »

Thanks, found it. but the error.log is empty

:/var/log/mysql# ls -l
total 0
-rw-rw---- 1 mysql adm 0 Jan 20 09:17 error.log

I am trying a fresh install again, install NC and then try the restore.. fingers crossed!
User avatar
Joulinar
Posts: 4804
Joined: Sat Nov 16, 2019 12:49 am

Re: Nextcloud on Dietpi v6.34.3

Post by Joulinar »

ok let's check how the database will look like afterwards.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
cktechie
Posts: 37
Joined: Tue Jan 05, 2021 1:34 am

Re: Nextcloud on Dietpi v6.34.3

Post by cktechie »

Did a fresh install dietpi, installed NC, did a restore.
Same issue, NC does not work. mariadb does not start,

I think this is because I have pointed the dietpi_userdata to external drive, but this has to be on external drive due to huge size of photos and videos.

I feel if the dietpi_userdata is on the default location in /mnt, the database should be good.

Is there a fix for this.. Without a working restore, NC is not a good solution on Dietpi.

Any help here @MichaIng @Joulinar
User avatar
Joulinar
Posts: 4804
Joined: Sat Nov 16, 2019 12:49 am

Re: Nextcloud on Dietpi v6.34.3

Post by Joulinar »

ok let's try to see what happen with the database

Code: Select all

systemctl restart mariadb.service
journalctl -u mariadb
cat /var/log/mysql/error.log
readlink /var/lib/mysql
readlink -f /var/lib/mysql
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
cktechie
Posts: 37
Joined: Tue Jan 05, 2021 1:34 am

Re: Nextcloud on Dietpi v6.34.3

Post by cktechie »

these are the outputs:

Code: Select all

dietpi@NextCloud:/home$ systemctl restart mariadb.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'mariadb.service'.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ===
Job for mariadb.service failed because the control process exited with error cod                                                                             e.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

Code: Select all

dietpi@NextCloud:/home$ sudo journalctl -u mariadb
-- Logs begin at Thu 2019-02-14 02:11:59 PST, end at Thu 2021-01-21 07:45:09 PST. --
Jan 21 07:33:17 NextCloud systemd[1]: Starting MariaDB 10.3.27 database server...
Jan 21 07:33:19 NextCloud mysqld[634]: 2021-01-21  7:33:19 0 [Note] /usr/sbin/mysqld (mysqld 10.3.27-MariaDB-0+deb10u1) starting as process 634 ...
Jan 21 07:33:19 NextCloud mysqld[634]: 2021-01-21  7:33:19 0 [Warning] Could not increase number of max_open_files to more than 16384 (request: 32186)
Jan 21 07:33:19 NextCloud mysqld[634]: 2021-01-21  7:33:19 0 [Warning] Can't create test file /var/lib/mysql/NextCloud.lower-test
Jan 21 07:33:19 NextCloud mysqld[634]: [97B blob data]
Jan 21 07:33:19 NextCloud mysqld[634]: 2021-01-21  7:33:19 0 [ERROR] Aborting
Jan 21 07:33:19 NextCloud systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jan 21 07:33:19 NextCloud systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 21 07:33:19 NextCloud systemd[1]: Failed to start MariaDB 10.3.27 database server.
Jan 21 07:41:17 NextCloud systemd[1]: Starting MariaDB 10.3.27 database server...
Jan 21 07:41:17 NextCloud mysqld[1554]: 2021-01-21  7:41:17 0 [Note] /usr/sbin/mysqld (mysqld 10.3.27-MariaDB-0+deb10u1) starting as process 1554 ...
Jan 21 07:41:17 NextCloud mysqld[1554]: 2021-01-21  7:41:17 0 [Warning] Could not increase number of max_open_files to more than 16384 (request: 32186)
Jan 21 07:41:17 NextCloud mysqld[1554]: 2021-01-21  7:41:17 0 [Warning] Can't create test file /var/lib/mysql/NextCloud.lower-test
Jan 21 07:41:17 NextCloud mysqld[1554]: [97B blob data]
Jan 21 07:41:17 NextCloud mysqld[1554]: 2021-01-21  7:41:17 0 [ERROR] Aborting
Jan 21 07:41:17 NextCloud systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jan 21 07:41:17 NextCloud systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 21 07:41:17 NextCloud systemd[1]: Failed to start MariaDB 10.3.27 database server.
Jan 21 07:44:47 NextCloud systemd[1]: Starting MariaDB 10.3.27 database server...
Jan 21 07:44:48 NextCloud mysqld[1728]: 2021-01-21  7:44:48 0 [Note] /usr/sbin/mysqld (mysqld 10.3.27-MariaDB-0+deb10u1) starting as process 1728 ...
Jan 21 07:44:48 NextCloud mysqld[1728]: 2021-01-21  7:44:48 0 [Warning] Could not increase number of max_open_files to more than 16384 (request: 32186)
Jan 21 07:44:48 NextCloud mysqld[1728]: 2021-01-21  7:44:48 0 [Warning] Can't create test file /var/lib/mysql/NextCloud.lower-test
Jan 21 07:44:48 NextCloud mysqld[1728]: [97B blob data]
Jan 21 07:44:48 NextCloud mysqld[1728]: 2021-01-21  7:44:48 0 [ERROR] Aborting
Jan 21 07:44:48 NextCloud systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jan 21 07:44:48 NextCloud systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 21 07:44:48 NextCloud systemd[1]: Failed to start MariaDB 10.3.27 database server.
dietpi@NextCloud:/home$

Code: Select all

dietpi@NextCloud:/home$ sudo cat /var/log/mysql/error.log
dietpi@NextCloud:/home$

Code: Select all

dietpi@NextCloud:/home$
dietpi@NextCloud:/home$ readlink /var/lib/mysql
/mnt/dietpi_userdata/mysql

Code: Select all

dietpi@NextCloud:/home$ readlink -f /var/lib/mysql
dietpi@NextCloud:/home$
-------------------------------------------------------------------------------------------
Thanks for these commands, looks like the database is not available for the service to start.

Note that the dietpi_userdata has been moved to external drive - this was done with a working NC setup on Dietpi, backup restored to fresh Dietpi installation.

mysql files are still available on the external drive

When the dietpi restore is completed, will the dietpi_userdata be pointed to the external drive from the data in backup?
User avatar
Joulinar
Posts: 4804
Joined: Sat Nov 16, 2019 12:49 am

Re: Nextcloud on Dietpi v6.34.3

Post by Joulinar »

I modified your post a little bit to get the coding more readable. Hope it is ok for you.

Question:
- what data are included into your backup?
- To which location you restored the backup?

Can you share ls -la /mnt
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
cktechie
Posts: 37
Joined: Tue Jan 05, 2021 1:34 am

Re: Nextcloud on Dietpi v6.34.3

Post by cktechie »

thanks for adjusting the format!!

Steps for Restore performed - used completely separate external drive and microSD Card (dietpi on RPi) for the restore
1. Copied the dietpi_userdata from old to new external drive with same folder / file hierarchy
2. Restored the backup using the dietpi-back to the freshly installed Dietpi with NextCloud.

Code: Select all

dietpi@NextCloud:/home$ ls -la /mnt
total 32
drwxr-xr-x  8 root   root   4096 Jan 20 17:04 .
drwxr-xr-x 21 root   root   4096 Sep 10 05:30 ..
dr-xr-xr-x  2 root   root   4096 Jan 20 17:04 XXXXXXXX-bcab-48e3-90a9-XXXXXXXXXXXX
drwxr-xr-x  4 root   root   4096 Jan 19 15:57 XXXXXXXX-8746-493a-8398-XXXXXXXXXXXX
drwxr-xr-x 17 root   root   4096 Jan 20 07:01 XXXXXXXX-31ca-463d-af29-XXXXXXXXXXXX
drwxrwxr-x  2 dietpi dietpi 4096 Sep 10 05:28 ftp_client
drwxrwxr-x  2 dietpi dietpi 4096 Sep 10 05:30 nfs_client
drwxrwxr-x  2 dietpi dietpi 4096 Sep 10 05:30 samba
dietpi@NextCloud:/home$
User avatar
Joulinar
Posts: 4804
Joined: Sat Nov 16, 2019 12:49 am

Re: Nextcloud on Dietpi v6.34.3

Post by Joulinar »

ok we are getting closer, you are missing the link dietpi user data pointing to your HDD

basically you would need to mound the HDD to /mnt/<hdd_name> and create a symlink.

Can you share ls -la /mnt from the original system pls
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
cktechie
Posts: 37
Joined: Tue Jan 05, 2021 1:34 am

Re: Nextcloud on Dietpi v6.34.3

Post by cktechie »

this is the output from the original NC Dietpi Setup:

Code: Select all

dietpi@NextCloud:~$ ls -la /mnt
total 32
drwxr-xr-x  8 root   root   4096 Jan 19 07:47 .
drwxr-xr-x 21 root   root   4096 Sep 10 05:30 ..
drwxr-xr-x  2 root   root   4096 Dec 30 11:24 XXXXXXXX3E77XXXX
drwxr-xr-x  5 root   root   4096 Dec 30 13:08 XXXXXXXX-bcab-48e3-90a9-XXXXXXXXXXXX
drwxr-xr-x 17 root   root   4096 Jan 20 07:01 XXXXXXXX-31ca-463d-af29-XXXXXXXXXXXX
lrwxrwxrwx  1 root   root     57 Dec 29 14:09 dietpi_userdata -> /mnt/XXXXXXXX-bcab-48e3-90a9-XXXXXXXXXXXX/dietpi_userdata
drwxrwxr-x  2 dietpi dietpi 4096 Sep 10 05:28 ftp_client
drwxrwxr-x  2 dietpi dietpi 4096 Sep 10 05:30 nfs_client
drwxrwxr-x  2 dietpi dietpi 4096 Sep 10 05:30 samba
dietpi@NextCloud:~$
User avatar
Joulinar
Posts: 4804
Joined: Sat Nov 16, 2019 12:49 am

Re: Nextcloud on Dietpi v6.34.3

Post by Joulinar »

there you see the link pointing to your HDD

Code: Select all

lrwxrwxrwx  1 root   root     57 Dec 29 14:09 dietpi_userdata -> /mnt/XXXXXXXX-bcab-48e3-90a9-XXXXXXXXXXXX/dietpi_userdata
That's what need to be created on your new system pointing to your new HDD
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply