Feature: restore backup from file (via API / .NET client)
Use-case: i am evaluating options for integration tests and one solution is spin-up Squidex in docker, restore app from backup and perform tests. Easiest way to do this is seems to be restoring app with Squidex sdk (at least for .net)
workaround 1: use some fileserver together with Squidex (docker compose) and provide URL with that way (i do not like it, it is another stuff in pipeline).
workaround 2: store backup file in some storage (S3, Azure…). Then it is not directly part of repository, i do not know if it is fine.
I understood that restore is mainly for migration application (to/from cloud). But this use case can be helpful even to only cloud users. Or i missing something and it is better way to write tests against Squidex (similar to EF - in memory DB)?
90% of the management endpoints are generated from the OpenAPI spec for the .NET client, so you can do the same with a programming language of your choice. This is one approach.
You can also use the CLI for that, but not everything is supported: https://docs.squidex.io/02-documentation/developer-guides/automation-tools#synchronize-all-app-settings-beta . But this is my focus for the next couple of weeks. I recommend this approach because it gives you a config in your source control with all the advantages. The goal of the next weeks is that you can manage everything in files and then apply all changes with a single command. It is already possible for big parts of the application.
If you want to use backups, you can also use a file url, so you mount a volume into Squidex and restore the backup with a file://my/path URL.
I look to synchronize tool but it cannot import content and for my it seems easiest manage “default” data for tests in Squidex then manually solving “import”. And because it is tests it isn’t just make it once as in case when it is migrating from different CMS.
This is good point with mounting file to volume it will solve the problem for me. You can close this feature request because it is actually not need. Thanks for advice.
I am happy to see you working on sync because it will be fine to keep everything in repository.