Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] converting sqlite to postgresdb #441

Closed
1 task done
eisvogelETH opened this issue Jun 6, 2024 · 17 comments
Closed
1 task done

[BUG] converting sqlite to postgresdb #441

eisvogelETH opened this issue Jun 6, 2024 · 17 comments

Comments

@eisvogelETH
Copy link

eisvogelETH commented Jun 6, 2024

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>
Copy link

github-actions bot commented Jun 6, 2024

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

@j0nnymoe
Copy link
Member

j0nnymoe commented Jun 6, 2024

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

@Investigamer
Copy link

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.

@joshtrichards
Copy link

@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.

@johnny2678
Copy link

wow, bad timing.

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

@eisvogelETH
Copy link
Author

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

@Investigamer
Copy link

Investigamer commented Jun 27, 2024

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 😅

@CorneliousJD
Copy link

Still not resolved in 29.0.4 sadly...

@johnny2678
Copy link

Still not resolved in 29.0.4 sadly...

Thanks for letting us know

@nate-moo
Copy link

nate-moo commented Aug 4, 2024

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

@joshtrichards
Copy link

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.

@Investigamer
Copy link

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.

@joshtrichards
Copy link

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

nextcloud/server#45257 (comment)

@Investigamer
Copy link

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.

@Meowcat285
Copy link

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

@Investigamer
Copy link

Investigamer commented Sep 17, 2024

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 😅

@drizuid
Copy link
Member

drizuid commented Oct 4, 2024

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.

@drizuid drizuid closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2024
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

9 participants