Open Moep90 opened 2 years ago
Any update here?
I do not see how the Backup app is linked to your issue
Because the db error relats to the fields in the database. These files are related to the files the "backup app" creates. And when deleting it, it does not cleanup db entries which cuases the issue I described.
I'm seeing the same error in my journal (AMD64 // Debian Bullseye // PostgreSQL 13.9 (Debian 13.9-0+deb11u1) // bare metal install):
Mar 07 07:28:20 HOST postgres[97699]: [6-1] 2023-03-07 07:28:20.285 CET [97699] nextcloud@nextcloud ERROR: duplicate key value violates unique constraint "fs_storage_path_hash"
Mar 07 07:28:20 HOST postgres[97699]: [6-1] 2023-03-07 07:28:20.285 CET [97699] nextcloud@nextcloud DETAIL: Key (storage, path_hash)=(2, 6ed7df8e17dab7bc10be0108fb27e92f) already exists.
Mar 07 07:28:20 HOST postgres[97699]: [6-1] 2023-03-07 07:28:20.285 CET [97699] 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)
I have installed nextcloud 25.0.4 by updating from 24.0.10, but botched my database along the way and had to completely start over with a new database. I ran the 'missing-indices' command after the update.
Noticed the error twice now:
Also seeing the same error after migrating from mariadb to postgresql on 24.x and seeing it now that I'm on 25.0.3. Perhaps it existed on 24.x as well but I don't remember as this is a test instance. This causes random timeouts in the UI trying to upload files, add comments to Deck, etc. etc.
36
2023-04-14 21:25:05.269 UTC [761] ERROR: duplicate key value violates unique constraint "fs_storage_path_hash"
35
2023-04-14 21:25:05.269 UTC [761] DETAIL: Key (storage, path_hash)=(42, 0c6e3521b073fa8ff080ac1693265419) already exists.
34
2023-04-14 21:25:05.269 UTC [761] 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)
33
2023-04-14 21:25:05.341 UTC [761] ERROR: duplicate key value violates unique constraint "fs_storage_path_hash"
32
2023-04-14 21:25:05.341 UTC [761] DETAIL: Key (storage, path_hash)=(42, 670c209cc1c3bf3d64f9d6bf1c8038bd) already exists.
31
2023-04-14 21:25:05.341 UTC [761] 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)
Hey folks, I migrated my database from MariaDB to PSQL this weekend using this command:
Versions
Backup = 1.0.6 Nextcloud Server = Nextcloud Hub II 23.0.0
DB Migration
This did not report any errors etc so I assume nextcloud migrated with success.
Error Picture
However, after the migration was done I encountered strange behavior, since nextcloud often switches to maintenance back and forth (almost minutewise). I looked up and saw in Postgres stuff like that:
and this...
DB investigation
Running the following in Postgres gave me the clue that somethis is wrong with the backup app or at least with its database entries:
Which looks like this:
Reset
After Runnin the following command, the entities are still persistent within the database:
I'd like to use the Backup app in the future so any help would be appreciated.