Problem restoring data and loading new data

Hello everyone, I installed owncloud (10.3.2) on a raspberry 4 with a rai1 on 2 hdd …
(the Hdd are mounted in / mnt / cloud) I then restored the data of the previous configuration by giving the commands:

sudo systemctl stop apache2

rsync -avz /var/www/owncloud/data /mnt/

ln -s /mnt/data /var/www/owncloud/data

sudo systemctl start apache2


and then given:

chown -R www-data:www-data /


the data has been transferred but I cannot preview it and if I download something I receive the error: "File not found
The specified document was not found on the server.

You can click here to return to ownCloud."

If instead I try to load any data I get the error: Error assembling parts, status code 403

While you might think this is a good idea, I would guess that the data throughput on an RPi would be abysmal in this configuration. (Though I might be wrong as I don’t have a new RPi)

Don’t ever run this command this will destroy your Linux installation.

Judging from what you’re writing here I would guess that the problem is somewhere in your Linux or Apache configuration. And as it is also looking like you’re moving your data directory, you’ll have to make sure you follow the guides perfectly. Check your logs there will be error messages.

1 Like

With a raspberry 4 (also reading various guides) I think it can afford a raid1 (it will become a raid1 + 0), I’ll place the log file:

{“reqId”:“O4NBRb7wGbp5rIJ2mPrN”,“level”:3,“time”:“2020-01-07T08:44:12+00:00”,“remoteAddr”:“”,“user”:“Nemo”,“app”:“PHP”,“method”:“GET”,“url”:"/owncloud/remote.php/dav/files/Nemo/IMG_8533.JPG?c=5e9b52a64f2a52fb14027f52b0d1a276&x=64&y=64&forceIcon=0&preview=1",“message”:“fopen(/mnt/data/Nemo/thumbnails/11100/64-64.png): failed to open stream: No such file or directory at /var/www/owncloud/lib/private/Files/Storage/Local.php#298”}
{“reqId”:“pIbbonYZ6sRuVWhFuiEU”,“level”:3,“time”:“2020-01-07T08:44:12+00:00”,“remoteAddr”:“”,“user”:“Nemo”,“app”:“PHP”,“method”:“GET”,“url”:"/owncloud/remote.php/dav/files/Nemo/IMG_9145.JPG?c=8cffa458290f2c98fa9af35e755480ef&x=64&y=64&forceIcon=0&preview=1",“message”:“fopen(/mnt/data/Nemo/thumbnails/11101/64-64.png): failed to open stream: No such file or directory at /var/www/owncloud/lib/private/Files/Storage/Local.php#298”}
{“reqId”:“ogHxsFWDFen29O0E4QYb”,“level”:3,“time”:“2020-01-07T08:48:11+00:00”,“remoteAddr”:“”,“user”:“Nemo”,“app”:“no app in context”,“method”:“GET”,“url”:"/owncloud/ocs/v2.php/apps/notifications/api/v1/notifications?format=json",“message”:“User backend OC\User\Database is returning home: /mnt/cloud/data/Nemo for user: Nemo which differs from existing value: /mnt/data/Nemo”}
{“reqId”:“SicjFX8IWQ5pkdEb7p5I”,“level”:3,“time”:“2020-01-07T09:42:36+00:00”,“remoteAddr”:“”,“user”:"–",“app”:“no app in context”,“method”:“POST”,“url”:"/owncloud/index.php/login?redirect_url=%252Fowncloud%252Findex.php%252Fapps%252Ffiles%252F%253Fdir%253D%252F",“message”:“User backend OC\User\Database is returning home: /mnt/cloud/data/Nemo for user: Nemo which differs from existing value: /mnt/data/Nemo”}
{“reqId”:“8aB8oFJgnnCBg10BTwWo”,“level”:3,“time”:“2020-01-07T09:42:38+00:00”,“remoteAddr”:“”,“user”:“Nemo”,“app”:“PHP”,“method”:“GET”,“url”:"/owncloud/remote.php/dav/files/Nemo/IMG_4807.JPG?c=116f9235532514f45dee1dbb334824a8&x=64&y=64&forceIcon=0&preview=1",“message”:“fopen(/mnt/data/Nemo/thumbnails/11098/64-64.png): failed to open stream: No such file or directory at /var/www/owncloud/lib/private/Files/Storage/Local.php#298”}

Make sure that you have your data directory configured correctly.

1 Like

/mnt/data were the old coordinates (when I mounted a single HDD) now I have created 2 folders in /mnt (“nas” and “cloud”), where I then mounted the 3 HDDs, in “nas” runs SAMBA and on “cloud” (where I mounted the HDD in raid1) I have moved the data of owncloud … on the config.php file I entered the new path /mnt/cloud/data … I can’t understand where the error is

Please read this documentation article about how to properly move the data directory:


To move the given directory from /var/www/owncloud to /mnt/cloud I use this command, to restore the backup from (loading the data from the desktop on a HD) I use instead: rsync -Aax (path of the HDD)

Did you do the step:

  • Fix Hardcoded Database Path Variables
1 Like

I use mariadb, I gave the command indicated to me:

BlockquoteMariaDB [(none)]> use owncloud;

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

MariaDB [owncloud]> UPDATE oc_storages SET id=‘local::/mnt/nas’

-> WHERE id=‘local::/var/www/owncloud/data/’;

Query OK, 1 row affected (0.007 sec)

Rows matched: 1 Changed: 1 Warnings: 0

but I keep getting the same problem

You’re mentioning three different directories in your different posts further up:

  • /mnt/cloud
  • /mnt/nas
  • /mnt/data

Where is your data? I’m confused now…
What is currently set in the DB, you might have to adjust your update query:

SELECT * FROM oc_storages;

Can you paste the output of the above command if it’s not too long.

1 Like

sorry, I’m reinstalling everything from scratch, at the moment I only have one HDD mounted in /mnt in the “nas” folder then /mnt/nas/data…

Database changed
MariaDB [owncloud]> SELECT * FROM oc_storages;
| id | numeric_id | available | last_checked |
| local::/mnt/nas | 2 | 1 | NULL |
| local::/mnt/data/ | 3 | 1 | NULL |
| home::Nemo | 5 | 1 | NULL |
| home::GiovaniCRI | 6 | 1 | NULL |
| local::/mnt/nas/data/ | 7 | 1 | NULL |
5 rows in set (0.001 sec)

1 Like

Good idea, just mount your hard drive in the correct path and set the data directory in the config.php file before running the ownCloud installation.

Then you should be all good.

1 Like

in the config.php file I set the right path “mnt / nas / data” same for the other commands but, I still don’t see the previews and receive the error message when I try to download something

I tried to restore the cloud as it was before the installation of the RAID (therefore only one HD mounted in / mnt without any folder) I keep encountering the same problem … at this point I think it is a database error … Ideas?