Nextcloud on Dietpi v6.34.3

Thank you, it was what I feared.
I will have to start thinking about starting from 0 with a new installation.

well you could clone/copy your SD card and try to upgrade to Buster.

Joulinar, I ran the commands, after which the NC page launched however it does not let me login with previous created user login, used for backup as well as admin account.

Looks as if it just does not know the previous accounts.

Also, as an alternative, I have moved to the NextCloudPi (custom installation image) as well as the NextCloud install on Raspbian, 2 separate installs and try out the back and restore options.

NextCloud on Dietpi, at this point in time, does not seem to be easy for backup and restore,

Will wait to hear from Joulinar and others, who have helped tremendously so far!!

sorry I overlook your feedback. NextCloud user can be reset as follow

ncc user:resetpassword admin

Thanks for the command,

I was able to reset the password for admin. Once i logged in, not able to see any of the previous data / photos I had uploaded. Also created one other account for testing, that account too is missing in the account list.

any suggestions?

for me it looks like you did not restored the database, therefore it’s all empty. Anyway you could perform a file system scan to load all documents

ncc files:scan --all

This will rescan all files of all known users

I am planning to do a sql backup from original setup and perform a restore, however what is the password I should be using?

Have tried the initial software password used for the Dietpi Installation, password from the config.php?

dietpi@NextCloudPi:~$ sudo mysqldump --single-transaction -h X.X.X.X -u oc_admin -p XXXXXXXXXXXXXXXXXXXXXXXX [nextcloud] >  nextcloud-sqlbkp_`date +"%Y%m%d"`.bak
Enter password:
mysqldump: Got error: 2002: "Can't connect to MySQL server on 'X.X.X.X' (115)" when trying to connect

EDIT - I checked few more, did run a backup using the root account, able to do a sql backup after that (not sure if it is a good idea to use the root account!!)

mysqldump --single-transaction -h -u root nextcloud >  nextcloud-sqlbkp_`date +"%Y%m%d"`.bak

using root is fine as root is the superuser for the database

Just to show how DietPi is doing if you would remove NextCloud. One step during uninstallation is to create a DB backup

mysqldump nextcloud > $datadir/dietpi-nextcloud-database-backup.sql

$datadir is a variable and grep from config files

Fare more simple :slight_smile:

that is a great input, I will try that,

So far, I think the Dietpi-restore does not help much with the nextcloud restore. So my plan now is to do a full backup of nextcloud directory, database backup, and try the restore AFTER dietpi-backup has been restored.

just to avoid misunderstanding, $datadir is set inside dietpi scripts and can’t be simply used. You would need to replace it with the correct path or do your own scripting to have it defined.

sure, acknowledged!

Will keep the updates posted… will be doing this tonight, slowly one thing at a time :slight_smile:

Just want to make sure that If i go with NC, and if the setup crashes, I can re-build it back to where it was, and appreciate all the support and help I have received!!

If you’re storing only files/pictures on Nextcloud, most important is to keep/backup files on the disk. The rest, like database and users can be build manually. As you have seen, we could gain access to database as well we created a new admin user. And in theory you could scan ol files on file system level to get them visible on Nextcloud.

Joulinar Is there any option, where I can simply scan a folder of all the images and import (link) within the NextCloud, without the need to import the Database?

If you’re storing only files/pictures on Nextcloud, most important is to keep/backup files on the disk.

Probably you overlooked it

I did run it, but did not scan the images, is it meant to scan all the images?

files are scanned for user existing in NextCloud only.

Good and bad news… I was able to successfully backup & restore the NC on Dietpi…

After restore, I am able to login, and seeing preview of some photos, but unable to open. Gives an error.

I did run the ncc files:scan --all however access to files is not happening.

Any file permission issue?

did you ensure data path to the documents is correct? and what are permissions on your pictures?

Found one other thread to fix permission on nextcloud data

sudo chown -R www-data:www-data /mnt/dietpi_userdata/nextcloud_data

running this and rebooting the Dietpi RPi