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
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Edit ID of an existing collection
Hi there. Is it possible to edit an ID of an existing collection? Right now it looks impossible from AppWrite cloud at least.
- Seed db
hello there... is this correct way to seed appwrite