Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Having problems with moving nextcloud MySQL database files installed with snap
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Having problems with moving nextcloud MySQL database files installed with snap

sanvitsanvit Member

Hi, I have a bbox with LetBox (kind of like a slice and a slab from BuyVM sold together), and I installed nextcloud via snap (snap install nextcloud) on it. I have set the data directory to the block storage via symlink and currently havd around 15GB of files. However oc_filecache.ibd file was taking up like 8GB of storage. So this is what I did.

  1. Moved /var/snap/nextcloud/13144/mysql/nextcloud to /media/storage/nextcloud/mysql
  2. Added a symlink ln -s /medua/storage/nextcloud/mysql nextcloud
  3. Add this line to /etc/apparmor.d/tunables/alias
    alias /var/snap/nextcloud/13144/mysql/nextcloud/ -> /media/storage/nextcloud/mysql/,
  4. systemctl restart apparmor
  5. snap enable nextcloud

And I got this

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

I also tried systemctl stop apparmor but still got the same issue.

This is part of php_errors.log file which seems to indicate a sql error, but I failed to find the mysql log file. Any help would be awesome. Thanks!

Comments

  • dahartigandahartigan Member
    edited May 2019

    Aside from the "medua" typo which I assume is only on this post, the error basically says it's not able to open the file which is presumably the one you've moved.

    Plan B: nuke it and start again without snap

  • sanvitsanvit Member

    @dahartigan said:
    Aside from the "medua" typo which I assume is only on this post, the error basically says it's not able to open the file which is presumably the one you've moved.

    Plan B: nuke it and start again without snap

    Yup 'medua' is just a typo in the post :) the weird thing is file permission is set correctly (even setting it to 777 returns the same issue). Anyway, I do have to fo with Plan B since restoring from backup just nuked my server :(

  • @sanvit said:

    @dahartigan said:
    Aside from the "medua" typo which I assume is only on this post, the error basically says it's not able to open the file which is presumably the one you've moved.

    Plan B: nuke it and start again without snap

    Yup 'medua' is just a typo in the post :) the weird thing is file permission is set correctly (even setting it to 777 returns the same issue). Anyway, I do have to fo with Plan B since restoring from backup just nuked my server :(

    May I suggest just setting it up with apache and mysql? From the point of view of someone who has migrated my nextCloud setup more than I care to admit, it's definitely an easy process - and it's quite configurable without having the "intricacies" of other platforms like snap/docker etc

    Unless of course snaps are your thing, I just really never got on board with them - call me old school or skeptical lol

  • Maybe you need to change the ownership?

  • sanvitsanvit Member
    edited May 2019

    @dahartigan said:

    @sanvit said:

    @dahartigan said:
    Aside from the "medua" typo which I assume is only on this post, the error basically says it's not able to open the file which is presumably the one you've moved.

    Plan B: nuke it and start again without snap

    Yup 'medua' is just a typo in the post :) the weird thing is file permission is set correctly (even setting it to 777 returns the same issue). Anyway, I do have to fo with Plan B since restoring from backup just nuked my server :(

    May I suggest just setting it up with apache and mysql? From the point of view of someone who has migrated my nextCloud setup more than I care to admit, it's definitely an easy process - and it's quite configurable without having the "intricacies" of other platforms like snap/docker etc

    Unless of course snaps are your thing, I just really never got on board with them - call me old school or skeptical lol

    Yeah, I just wanted to try snap since my friend told me it was awesome. Guess it did more harm than good :(

    @chocolateshirt said:
    Maybe you need to change the ownership?

    The original ownership was root:root so I don't think that was the problem. It's all wiped out so I cant test it :(

Sign In or Register to comment.