Skip to content

[BUG] converting sqlite to postgresdb #441

Closed as not planned
Closed as not planned

Description

@stefan-cir

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

image
Unfortunately I am not able to convert the sqlite to a postgres db with the comment below...

Expected Behavior

working migration

Steps To Reproduce

try to migrate linuxserver/nextcloud (tried to upgrade to the tag latest 4h ago (29.0.2) and still not working

Environment

- OS: ubuntu 22.04 lts
- How docker service was installed:

CPU architecture

x86-64

Docker creation

nextcloud:
    image: lscr.io/linuxserver/nextcloud:latest
    container_name: nextcloud
    environment:
      - PUID={{ puid }}
      - PGID={{ pgid }}
      - TZ={{ timezone }}
    volumes:
      - "{{ docker_dir }}/nextcloud/appdata:/config" 
      - "{{ docker_dir }}/nextcloud/data:/data"
    restart: unless-stopped
    depends_on:
      - nextcloud-db
    links:
      - nextcloud-db
    ports:
      - '4443:443'
  
  nextcloud-db:
    image: postgres:15
    restart: always
    container_name: nextcloud_db
    environment:
      - POSTGRES_USER={{ nextcloud_user }}
      - POSTGRES_PASSWORD={{ nextcloud_pw }}
      - POSTGRES_DB={{ nextcloud_db }}
    volumes:
      - "{{ docker_dir }}/nextcloud/db:/var/lib/postgresql/data"
    healthcheck:
      test: ["CMD-SHELL", "sh -c 'pg_isready -U {{ nextcloud_user }} -d nextcloud'"]
      interval: 10s
      timeout: 3s
      retries: 3

Container logs

docker exec -it nextcloud bash
root@xxxx:/# occ db:convert-type --port 5432  --all-apps  --password=XXXXX pgsql user host db

In ConvertType.php line 183:
                                                                              
  This command is temporarily disabled (until the next maintenance release).  
                                                                              

db:convert-type [--port PORT] [--password PASSWORD] [--clear-schema] [--all-apps] [--chunk-size CHUNK-SIZE] [--] <type> <username> <hostname> <database>

Activity

  1. github-actions commented on Jun 6, 2024

    @github-actions

    Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

  2. j0nnymoe commented on Jun 6, 2024

    @j0nnymoe
    Member

    That seems more like something nextcloud disabled rather than anything to do with us.

  3. Investigamer commented on Jun 13, 2024

    @Investigamer

    Is there a nextcloud version you can safely revert to in order to convert your database, then jump back to latest? I also picked a terrible time to finally switch to postgres unfortunately.

  4. joshtrichards commented on Jun 17, 2024

    @joshtrichards

    @Investigamer Anything <29. But you can't downgrade so it would have to be using a database snapshot from prior to upgrading to v29.

    Context: This command was disabled very recently (in 29.0.1). So alternatively, If you can wait another maintenance release cycle or two (maintenance releases are published at least monthly), things should be back to normal and you'd be able to do the conversion without making other changes or reverting to an old backup.

    Whatever you do, don't try doing it with 29.0.0. This command was disabled intentionally for the 29.0.1 release to prevent people inadvertently stumbling onto a data loss regression in this command that arose from some other v29 specific db change work.

  5. johnny2678 commented on Jun 22, 2024

    @johnny2678

    wow, bad timing.

    Need to save off my occ command so I don't have to spend 15 minutes constructing it next time 😂

  6. stefan-cir commented on Jun 23, 2024

    @stefan-cir
    Author

    thank you for the replies guys! I guess i can close the issue now that we have a solution to this?

  7. Investigamer commented on Jun 27, 2024

    @Investigamer

    Thanks for the responses fellas. Just saw a new Nextcloud maintenance version has gone out, does anyone know if this was fixed in 29.0.3? Scouring the changelog, see some mention of changes with occ but nothing specific to this issue at first glance.

    EDIT: Not resolved, currently marked for maintenance release 29.0.4, you can follow current progress here.

    You might wanna keep this thread open till they resolve this issue so people can track the progress, if not feel free to lock it. Kinda weird they let this go 2 more maintenance releases without a resolution, its a major inconvenience 😅

  8. CorneliousJD commented on Jul 25, 2024

    @CorneliousJD

    Still not resolved in 29.0.4 sadly...

  9. johnny2678 commented on Jul 25, 2024

    @johnny2678

    Still not resolved in 29.0.4 sadly...

    Thanks for letting us know

  10. nate-moo commented on Aug 4, 2024

    @nate-moo

    Based on this PR, it looks like its being slated for v30
    nextcloud/server#46931

  11. joshtrichards commented on Aug 5, 2024

    @joshtrichards

    It'll be backported to all applicable non-EoL majors once merged; it's a bug fix. i.e. the nearest maintenance release for v29 will get it too.

  12. Investigamer commented on Aug 8, 2024

    @Investigamer

    For anyone wondering if you can backup your instance and spin up an instance of v30.0.0-beta4, no the command is still disabled as of beta 4. Things are happening at least.

  13. joshtrichards commented on Aug 8, 2024

    @joshtrichards

    If you're in a position to test, see here:

    nextcloud/server#45257 (comment)

  14. Investigamer commented on Sep 4, 2024

    @Investigamer

    Unfortunately I'm not in a position to test, but just to update everyone this likely won't be fixed till at least 29.0.7 based on current milestones.

  15. Meowcat285 commented on Sep 17, 2024

    @Meowcat285

    Unfortunately I'm not in a position to test, but just to update everyone this likely won't be fixed till at least 29.0.7 based on current milestones.

    Sadly still not fixed on 29.0.7

  16. Investigamer commented on Sep 17, 2024

    @Investigamer

    Sadly still not fixed on 29.0.7

    This issue has now been marked with milestone 31 on the issue tracker... welp fellas, I think at this point I'm just going to build a fresh nextcloud installation 😅

  17. drizuid commented on Oct 4, 2024

    @drizuid
    Member

    im going to go ahead and close this as it is very much out of scope for us. I wish you all luck in getting what you need from nextcloud.

  18. moved this from Issues to Done in Issue & PR Trackeron Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions