VPS error hit me last night, I can backup the containers but I am unsure how to do so..
- 1
- Self Hosted
can't find anything on attempts to handle DB storage transfers
if anyone replies please @ me
Sorry to hear about your VPS disaster 😕
I would backup from the old server and restore to the new:
https://www.youtube.com/watch?v=lM5yZEPtlvg&ab_channel=Appwrite
thank you, still at it, going to check this out now
so, I managed to salvage everything but there is this really odd thing going on
def updateCardArtURLAttributes(self, collectionID):# payload will have the documentID
url = self.ENDPOINT + "/databases/" + self.DATABASE_ID + "/collections/" + collectionID + "/documents?queries[0]=limit(100)"
self.log.info(url)
jsonResponse = requests.request("GET", url, headers={'X-Appwrite-Project': str(self.PROJECT)} , data = {}).json()
self.log.info("\n jsonResponse : \n" + str(jsonResponse) + "\n \n \n")
cardArtURLList = []
totalDocuments = int(jsonResponse['total'])
if totalDocuments >= 100:
totalDocuments = 100
for index in range(0,totalDocuments - 1):
print(index)
databases = Databases(self.CLIENT)
documentID = str(jsonResponse['documents'][index]['$id'])
cardName = str(jsonResponse['documents'][index]['cardName'])
cardArtFileSaveName = str(jsonResponse['documents'][index]['cardName']).replace(" ", "-") +'.png'
cardArtURL = str(self.HOST_URL) + "/cardArt/" + str(cardArtFileSaveName)
# self.log.info("updating " + str(jsonResponse['documents'][index]['cardName']) + "'s cardArt URL to : " + cardArtURL + " \n ")
# print(str(self.DATABASE_ID) + ' ' + str(collectionID) + ' ' + str(documentID))
print(str(jsonResponse['documents'][index]))
self.log.info(str(self.DATABASE_ID) + ' ' + str(collectionID) + ' ' + str(documentID))
cardArtURLList.append({ "documentID" : str(documentID), "cardName" : str(cardName), "cardArt" : str(cardArtURL) })
try:
data ={ "cardURL" : str(cardArtURL) }
print(data)
result = databases.update_document( self.DATABASE_ID, collectionID, documentID, data ={ "cardArt" : str(cardArtURL) } )
except Exception as e:
self.log.error("\n================================================\nerror while attempting to update cardArt links \nIOError :\n" + str(e) )
print("\n================================================\nerror while attempting to update cardArt links \nIOError :\n" + str(e) )
return cardArtURLList
honestly, I am exhausted
have not slept for about 2 days and have been on this after being awake long enough to not be tired again, about to call it here but I think I should mention what is going on
as it is strange
the above didn't have any issues until the importing of the backed up DB data
there are two services that engage this method
they both have the same attributes and schema
and the payloads, everything comes out the same
but for some reason one of the two was throwing this error
I haver to update the card art urls because the endpoint they were using has changed as I have changed servers
at first the prompt said that there was no "cardArt" attribute, and there is and should be... but it was so odd I decided to remove it
and now I am receiving the same error but for the next top line item in the schema
but I am doing a update
and my payload doesn't have anything other than the contents needing to be updated
I think this might actually be a bug
I am going to update as I see a prompt
but wanted to give the feedback
What error?
How exactly did you restore?
Recommended threads
- Appwrite-injected variables are not avai...
I am using rust-1.83 as a runtime and try to access APPWRITE_FUNCTION_API_ENDPOINT or APPWRITE_FUNCTION_API_KEY during runtime. Both are not set during my execu...
- OAuth Missing redirect URL
Hello all, on a Flutter mobile app with latest Appwrite dependency (25.4.0) I always got "Missing redirect URL" - "Your OAuth login flow is missing a proper red...
- relationships bug or error idk
hey every one, am using am using appwrite on a project and ran into a problem where by created a relationship and two way to be specific and it is stuck on proc...