Back

Restoring the storage buckets only from backup

  • 1
  • Self Hosted
  • Storage
Baudouin Arbarétier
18 Jul, 2023, 09:48

Hi ! I did a mistake on my storage bucket but fortunately I have an old backup. (using this method which works flawlessly : https://dev.to/appwrite/appwrite-in-production-backups-and-restores-4beg)

However I would like to restore the storage part only, because we had new users and activity since then.

How can I restore the storage buckets only from an old backup ?

I tried tinkering with the restore script and dump.sql file but it always seem break my appwrite instance.

Thanks !

TL;DR
User accidentally deleted and replaced pictures on their storage bucket. They are unable to read images and their Appwrite container is behaving strangely. They want to restore only the storage buckets from an old backup without affecting other data. They have tried modifying the restore script and dump.sql file but it breaks their Appwrite instance.
Drake
19 Jul, 2023, 00:07

can you explain more about what happened? what was the mistake?

what exactly breaks?

Baudouin Arbarétier
19 Jul, 2023, 07:41

I did a batch deleting pictures and replacing them with compressed versions of them.

But it didn't upload some files after deleting them...

Anyway, my problem is I would like to restore my storage buckets from another backup, and not override any other data

Baudouin Arbarétier
19 Jul, 2023, 10:17
TypeScript
[Error] URL: /v1/storage/buckets/:bucketId/files/:fileId/preview
[Error] Type: ImagickException
[Error] Message: no decode delegate for this image format `' @ error/blob.c/BlobToImage/458
[Error] File: /usr/src/code/vendor/utopia-php/image/src/Image/Image.php
[Error] Line: 45
[Error] Timestamp: 2023-07-19T10:14:40+00:00
[Error] Method: GET
[Error] URL: /v1/storage/buckets/:bucketId/files/:fileId/preview
[Error] Type: ImagickException
[Error] Message: no decode delegate for this image format `' @ error/blob.c/BlobToImage/458
[Error] File: /usr/src/code/vendor/utopia-php/image/src/Image/Image.php
[Error] Line: 45
[Error] Timestamp: 2023-07-19T10:14:40+00:00
[Error] Method: GET
[Error] URL: /v1/storage/buckets/:bucketId/files/:fileId/preview
[Error] Type: ImagickException
[Error] Message: no decode delegate for this image format `' @ error/blob.c/BlobToImage/458
[Error] File: /usr/src/code/vendor/utopia-php/image/src/Image/Image.php
[Error] Line: 45
[Error] Timestamp: 2023-07-19T10:14:40+00:00
Baudouin Arbarétier
19 Jul, 2023, 10:18

my appwrite container is doing weird stuff

Baudouin Arbarétier
19 Jul, 2023, 10:18

i can't read images anymore from my instance !

Baudouin Arbarétier
19 Jul, 2023, 10:35

You guys really need to work on a backup/restore solution..... The script on dev.to causes huge bugs

Drake
19 Jul, 2023, 16:00

I did a batch deleting pictures and replacing them with compressed versions of them.

How did you do that?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more