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
- general_bad_request when creating accoun...
I have created a new bug request, could anyone have a look - https://github.com/appwrite/appwrite/issues/11908?
- Cannot use custom SMTP for messaging (SM...
Hey there! I'm on Appwrite Self-hosted 1.9.0. I've never used the messaging feature before, always sent emails through functions or a custom backend, but I'v...
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...