Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Nextcloud - update to 20.0.2 failed

    Nextcloud
    3
    9
    484
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      Dimitri Veny last edited by

      Our nextcloud instance made an update to 20.0.2
      The migration script is failing...
      Add primary key to the filecache_extended table
      --> can't add primary key on fileid

      The server is in a deadloop where the migration script is launched

      We need to get our instance back
      Help would be really appreciated

      girish 1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff last edited by

        Hi there,

        indeed you are not the first one to hit this. Unfortunately some Nextcloud instances for some so far unknown reason created duplicate file ids in the database and the latest version requires a primary key on those (meaning also that they have to be unique)

        I saw that you contacted us on support with SSH enabled, I will take a look to see if we can find a solution besides restoring the app instance to the previous version.

        1 Reply Last reply Reply Quote 0
        • girish
          girish Staff last edited by

          Seems the same as https://forum.cloudron.io/topic/3817/nextcloud-20-0-2-not-responding-key-is-duplicated

          D 1 Reply Last reply Reply Quote 0
          • D
            Dimitri Veny @girish last edited by

            @girish Thanks but how can we have this settled ?
            I have already sent an email to support
            What's their usual reponse time ?

            girish 1 Reply Last reply Reply Quote 0
            • girish
              girish Staff @Dimitri Veny last edited by

              @dimitri-veny We try to respond as quickly as we can. Not sure which plan you are on, but we only have priority support for the paid plans - https://www.cloudron.io/pricing.html

              1 Reply Last reply Reply Quote 0
              • girish
                girish Staff last edited by

                https://github.com/nextcloud/server/issues/19494 seems to be a similar upstream issue.

                1 Reply Last reply Reply Quote 0
                • girish
                  girish Staff @Dimitri Veny last edited by

                  @dimitri-veny Just a heads up, we are close to a solution.

                  1 Reply Last reply Reply Quote 0
                  • nebulon
                    nebulon Staff last edited by

                    So it looks like the following SQL snippet will fixup that table and then lets Nextcloud create that primary key and thus be up and running again:

                    CREATE TABLE foobar AS SELECT fileid, metadata_etag, creation_time, MAX(upload_time) AS upload_time FROM oc_filecache_extended GROUP BY fileid, metadata_etag, creation_time;
                    DROP TABLE oc_filecache_extended;
                    ALTER TABLE foobar RENAME TO oc_filecache_extended;
                    

                    I will try to test this on another instance first and then we make a new app package with that fix for others.

                    @Dimitri-Veny can you please report if your instance works as expected?

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      Dimitri Veny @nebulon last edited by

                      @nebulon thanks a lot for your help !!
                      Really appreciated..
                      I confirm that our instance works correctly now 👍

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post
                      Powered by NodeBB