Closed danielnetop closed 3 years ago
Hey,
The main issue here is: why is there no such file or directory? Are you maybe using Docker and have not marked the data volume to be saved? If so, which Docker image is it? Please report it to them! I'm pretty sure that's what's going on.
Though also interesting is: why is it not showing up in the Android client? It shows like it's a real server error which should make the client complain. :|
-- Tom
Hi, I'm using the "official" one by victorrds, I've comment on a similar ticket there, when upgrade to etebase (etesync 2.0) I didn't know we'd needed to save that user information, it wasn't specified anywhere, I'll probably try to migrate from the app where it works, and will try to migrate all that data into another user and see if it solves. Thank you
Yeah, so it's probably that. I think He updated the README about it.
Sorry for the late comment, I was running my own backup here, for anyone using my image and having this error:
This was not caused by a "minor upgrade", this was caused by a mistake from my image, not server problem it was my fault.
When I first created the Dockerfiles and images there was no mention in the server repository about the MEDIA_ROOT
directory role in the data persistence, and when looked into the /etebase_server/settings.py file:
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/
STATIC_URL = "/static/"
STATIC_ROOT = os.environ.get("DJANGO_STATIC_ROOT", os.path.join(BASE_DIR, "static"))
MEDIA_ROOT = os.environ.get("DJANGO_MEDIA_ROOT", os.path.join(BASE_DIR, "media"))
MEDIA_URL = "/user-media/"
And made the wrong assumption that this directory contained "web related files" and chose to keep it in the /srv/etebase
right besides the "static" folder, and that was a mistake.
Fast forward to the issue #42, thanks to @thgoebel, we discussed about the MEDIA_ROOT
, and @tasn explained that the actual data goes there and that database only holds metadata, he also fixed the docs on the server repository, but I already published my images, I should've asked Tom before making my on baseless assumptions.
This will not happen again, and is always good to backup before upgrade.
@tasn I've just migrated to a new user, using the app, import from the old to the new one and I'm still getting this error when going to pim.etesync.com
FileNotFoundError at /api/v1/collection/AcyatV7xOjdPlHp44KgsewwmL8yDm7Ig/item/
[Errno 2] No such file or directory: '/data/media/user_3/AcyatV7xOjdPlHp44KgsewwmL8yDm7Ig/XM/pTe844rm2QDa1380YLZgQ7-zl3Webux2VTOdpYtgc'
And right now I see some information on that folder for the user, but not that specific folder
If I had to guess: you haven't put that folder on persistent storage still, so it again reset between docker restarts. You need to have it on persistent storage, the same way the database is.
I think I know what happened here, I deleted the calendar on the app and then I deleted the folder on the server. Because looking at the current folders I have the amount of folders corresponding to my number of calendars and contact books
Don't manually delete data behind Etebase's back, it's a recipe for trouble. :P
Yeah, but since I deleted the calendar on the app I thought that it was supposed to forget about all that reference :/
But the directories stay there and on the metadata as well apparently
Going to create a new user and this time to not mess with it.
If I use the admin dashboard to delete the old users, is it safe to delete them?
Or is it better to start fresh and remove the old database and folders?
Do not create new users, start another server instance, with a clean database and media directory.
Better start from scratch, but there's no problem with deleting users from the dashboard.
Thank you, will do that and I'll comment back afterwards. Thanks
Hi @tasn, @victor-rds Already finished the migration to a new directory and server.
It's apparently working well 😄
Thank you so much for your help, and also help me understand as well what happened.
Going now update my backup script to include the media directory.
Great to hear, and thanks for the update!
Hi, I'm setting up a new phone and the android app is not working, however on my current phone I don't get any kind of error when using the etesync application. Posting on the server repo because this is the error I'm getting on the server with the debug flag as true.
Not sure what's wrong, can you help with it?
Full log of one of the collections: