webflorist / storyblok-backup

npx CLI tool to create a backup of a Storyblok space and restore single resources from it
MIT License
14 stars 1 forks source link

How to restore data? #1

Open chrschdev opened 11 months ago

chrschdev commented 11 months ago

Hey, nice that you have developed a script for storyblok space backups!

Not an issue, but what is the recommended way to restore an existing backup to storyblok?

codeflorist commented 11 months ago

hey @chrschdev,

at the moment no restore-functionality is included. i might add one in the future.

you can call storyblok's management API to update or create single elements.

cgpro commented 10 months ago

A restore function would be very handy... +1 😬 but nevertheless, the script is already very cool. stupid pricing strategy at storyblok... to enable backups only from business level. 🙄

chrschdev commented 10 months ago

@cgpro totally agree, i also don't understand why this is only a business level feature. I stopped creating new projects with Storyblok, have no trust anymore in their pricing policy...but nevertheless, thx @codeflorist for your work!

codeflorist commented 4 months ago

hey everyone!

i've just released v0.1.0, which includes a restore script (see docs for details). however, only restoring of single resources is possible.

a full restore over an existing space or via creating a new space is quite problematic, since non-existing resources will get new IDs and all relations must reflect that. i might add such a functionality later.

codeflorist commented 3 weeks ago

i've just released v0.3.0, which includes a new --propagate option for the restore script, which can be used in conjunction with --create. this option will update all stories referencing the old UUID (as stated in the backup-json's uuid field) in the relevant fields (single/multi-option, references, links, links in rich-text fields) with the new one.

it's still not a full restore, but one step closer to it.