I have a problem with duplicate key after doing a migration.
I used rsync as per backup section in manual to move my data folder from one server to the new one. I successfully imported my data base. Then things got a bit off the rails because I needed to upgrade. occ upgrade seemed to work but scan files made a error.
I tried logging in and only the file app is making a folder permission denied error for the home page. It is occurring for the first user and many others are working fine. the other apps like dashboard and talk work. I decided I would perhaps migrate the folders to a new user. I did one folder but now the new user has the same problem.
the database log shows this
nextcloud@nextcloud ERROR: duplicate key value violates unique constraint "fs_storage_path_hash"
2023-01-12 19:03:26.814 EST [59676] nextcloud@nextcloud DETAIL: Key (storage, path_hash)=(32, 5c0b53e8586b4daf42cf5dd5ef4c6caf) already exists.
2023-01-12 19:03:26.814 EST [59676] nextcloud@nextcloud STATEMENT: INSERT INTO "oc_filecache" ("mimepart", "mimetype", "mtime", "size", "etag", "storage_mtime", "permissions", "name", "parent", "checksum", "path_hash", "path", "storage") VALUES($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)
but when I try to see the duplicate I get this
postgres=# \c nextcloud;
You are now connected to database "nextcloud" as user "postgres".
nextcloud=# SELECT storage, path_hash FROM oc_filecache WHERE path_hash = '5c0b53e8586b4daf42cf5dd5ef4c6caf';
storage | path_hash
---------+-----------
(0 rows)
Any Ideas on how to fix this problem?