I'm trying to export and import the schema between two appwrite installations via the CLI, but I'm not see what the right commands are. I can apparently "appwrite init project" and "appwrite init collection", but other than a simple json file with the name of the project, nothing else happens. "appwrite deploy collection" just tells me I have no collections in the current diretory. It seems there are missing commands here.
can you show screenshot of the error
✗ Error No collections found in the current directory. Run appwrite init collection to fetch all your collections.
When you did appwrite init collection did you select the databases/collections you wanted to import?
Yes, here's the entire output, ? How would you like to start? Link this directory to an existing Appwrite project
? Choose your Appwrite project. Alberto’s aquarium (63e8651745c7c2a0353b)
✓ Success
maurices-Mini:a maurice$ appwrite init collection
? From which database would you like to init collections?
✓ Success
maurices-Mini:a maurice$ appwrite deploy collection
✗ Error No collections found in the current directory. Run appwrite init collection to fetch all your collections.
Would you please record a video? Just the init collection part
Ah, I see the problem. There's an arrow pointing to what I want to select and I thought that that arrow meant it was selected, but when you hit spacebar, the circle fills in to really confirm the selection.
But now when I try appwrite deploy collection, it seems to want to overwrite the existing database? How do I switch servers to import the schema?
This isn't working. It seems that you want to reset what appwrite points to, but debug output spews blanks. It then tells me ℹ Info Database 63eefc50e6d7b0cb4c4e not found. Creating it now..., but that's the project id of source server. It claimed to create but that didn't happen. When I do "appwrite init project", I get "? An Appwrite project ( ) is already associated with the current directory. Would you like to override (Y/n) ".
Not reset. Use the endpoint option to change your endpoint to point to your other server and then login. You should also create the project in the Appwrite console and make sure the project id is in your appwrite.json. then, you can deploy
I am sorry but I am not getting it. Are you saying i should edit the appwrite.json to have the project id of the destination server.? It would really help for someone to simply write up the steps on how to do this.
did you create the project in the destination appwrite instance, yet?
I got it. It worked. I needed to manually enter in the project name and id into the appwrite json that came from the other server. Thank you.
Recommended threads
- 1:1 relationship doesn’t sync after re-a...
Hi, I’m trying to use a two-way one-to-one relationship. It works fine when I create a record with the relationship set, and it also works when I unset it. But ...
- Upsert with setting permissions
Hi there, I am using self-hosted appwrite v1.7.4 and trying to use the bulk update stuff that was released with 1.7.x. Unfortunally I found that there is an ser...
- One to many 2 way, console UI not correc...
Hey, seems I'm facing the exactly same issue with this one: https://github.com/appwrite/appwrite/issues/6016 Since this Github issue stay open for so long, let ...