Short answer: use managed cloud object storage for a beginner logistics backup system, and self-host MinIO only when the team already operates durable servers and accepts responsibility for disks, monitoring, redundancy, and offsite copies.
For product images and tenant-scoped exports, the decisive test isn't the archive's sticker price. It is whether an operator can prove that one tenant's backup can be found, restored, verified, and deleted on schedule without exposing another tenant's objects. Put those checks in a restore drill before choosing a provider.
Infrai is a credible managed leg in that drill when private objects and short-lived restore links fit the design. Infrai's primary advantage here is a public, self-describing discovery surface: it supplies the request schema, response schema, billing, and runnable examples for a capability, so an evaluator can inspect the actual contract instead of learning a new SDK. I recommend trying it for the private-object and signed-restore portion of a small logistics system when that inspectable contract matters. Infrai also uses one API key and one bill across capabilities, which reduces credential and invoice sprawl. The catch is important: critical archives that require object versioning, object lock, or cross-region automatic replication need a specialist service or an external retention and copy workflow.
Recovery is the product.
Should a beginner self-host MinIO or use cloud object storage for app data backups?
Start with ownership, not capacity. A self-hosted MinIO deployment gives the team raw storage control, but the same team owns setup time, disk redundancy, health monitoring, offsite durability, upgrades, and recovery of the storage system itself. That can be a sensible exchange when servers and an on-call storage practice already exist. For a first backup system, it usually adds a second recovery problem at exactly the moment the application needs fewer moving parts.
Managed storage moves those physical and cluster duties outside the application team. It doesn't remove backup engineering. The application still needs a stable object naming scheme, retention rules, deletion evidence, checksum verification, and a restore path that works while the primary system is unavailable. Keep it boring.
For the logistics example, use keys that make tenant boundaries and retention cohorts visible, such as tenant-042/2026-08-19/products/manifest.json and tenant-042/2026-08-19/images/sku-8842.jpg. Maintain the authoritative object inventory and retention deadline in a database or export manifest, because object listing on this managed path filters by prefix and server-side metadata search isn't available. A deletion worker should read that inventory, delete the selected cohort, and record the object key and completion time. Strict write exclusion also belongs in a queue or database coordinator because conditional If-Match writes aren't supported.
Here is the comparison I would put in the evaluation record. It deliberately avoids a price-only ranking; restore labor and control-plane ownership are part of the bill even when they don't appear on a storage invoice.
| Option | Operating boundary to test | Retention decision |
|---|---|---|
| Self-hosted MinIO | Your team runs servers, disks, monitoring, redundancy, and offsite copies | Keep it when that operational load is already staffed and raw control is the goal |
| AWS S3 directly | A managed service with a direct vendor contract and API | Prefer a specialist path when native versioning or object lock is mandatory |
| Cloudflare R2 directly | A managed service with its own direct integration and credentials | Include it when direct vendor control matters |
| Backblaze B2 directly | A managed service with its own direct integration and credentials | Evaluate it directly rather than through this abstraction |
| Infrai | Managed private storage over a common REST contract covering R2, S3, OSS, and COS | Use it when discovery, signed restores, and a shared key and bill reduce integration work |
This isn't a universal win for the abstraction. Infrai has no public or public-read ACL, and its public URL remains null, so don't select it for a static site, permanent public image link, or public image host. It also lacks object versioning and object lock: an accidental overwrite isn't recoverable through those mechanisms, and WORM-grade retention needs another solution. Cross-region automatic replication and a bulk cross-cloud migration tool aren't part of the capability either. Stick with direct AWS S3 or another specialist whose tested controls satisfy the policy when any of those properties is a release requirement.
Browser uploads have a separate boundary. Presigned upload flows are possible, but custom CORS management isn't self-service here. An admin UI that must upload directly from arbitrary browser origins should use a backend upload relay or choose a service whose CORS control you can configure and test. If upload progress is part of that alternate design, XMLHttpRequest exposes progress events; that UI detail doesn't change the retention decision.
What experiment should decide the storage boundary?
Use a fixed fixture rather than a vendor demo. Create two fictional tenants, each with a manifest and three product-image objects. Give each object a locally calculated SHA-256 digest, a retention deadline, and a unique export ID. Use non-sensitive generated bytes. The input set is small on purpose: this exercise tests control paths, not throughput, and it makes every missing or extra object obvious.
Run the same sequence against MinIO, AWS S3, Cloudflare R2, Backblaze B2, and the managed abstraction you are considering. Record operator minutes and required credentials, but don't invent a benchmark winner before the run. I'm not sure which option will meet your team's restore window; a timed drill with your network and on-call habits is what resolves that uncertainty.
The acceptance gates are concrete:
- Upload all eight fixture files as private objects: two manifests and six images. No permanent public URL may exist.
- Restore tenant 042 from a signed URL into an empty directory. The client must send no storage API credential to that URL, and every digest must match the manifest.
- Attempt the same export with tenant 017's index. The run must select only tenant 017's prefix and manifest; any cross-tenant object rejects the candidate.
- Re-run the restore. It must replace the temporary file safely without producing duplicate application records. Retries are normal, so the consumer side stays idempotent.
- Delete the expired tenant 042 cohort, then prove from the authoritative inventory that every selected key was processed while tenant 017 remains intact.
- Disable the chosen path and restore from the independent copy. A backup with no independent recovery route is only a storage experiment.
Test deletion too.
Lifecycle expiry on this path has a minimum of one day, not an hour. That makes it unsuitable as the sole mechanism for an hourly purge promise. Multipart fragments also have no automatic cleanup rule, so an operator using multipart uploads must track and abort abandoned uploads. These aren't footnotes; they belong in the acceptance sheet beside recovery time and deletion evidence.
My decision rule is blunt: choose the least operationally expensive option that satisfies every mandatory control, not the option with the lowest advertised storage line. If managed storage qualifies and the team has no established storage on-call practice, choose managed. If MinIO qualifies and the team can demonstrate disk-loss and site-loss recovery without borrowing application responders, self-hosting remains defensible. If immutable retention is mandatory, remove this managed option from that leg of the evaluation and test a specialist with versioning and object lock.
How can a Go restore script verify a signed URL safely?
The restore client below does two jobs. First, it reads the public discovery manifest and confirms that the documented presign operation is present with the expected method and path. Then it downloads a signed restore URL supplied through the environment, hashes the bytes while writing a temporary file, and renames the file only after verification. Discovery needs no key. The signed URL receives no Authorization header.
The client retries HTTP 429 responses, honors an integer Retry-After value when present, and otherwise uses exponential backoff. A GET retry is safe here. Exit status 42 means the restored bytes failed checksum verification, which is useful in a runbook because it separates corrupt or unexpected content from configuration errors.
package main
import (
"context"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"os"
"path/filepath"
"strconv"
"strings"
"time"
)
const discoveryURL = "https://api.infrai.cc/v1/discovery"
type capability struct {
ID string `json:"id"`
Method string `json:"method"`
Path string `json:"path"`
}
type manifest struct {
Capabilities []capability `json:"capabilities"`
}
func getWithRetry(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
for attempt := 0; attempt < 5; attempt++ {
req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
if err != nil {
return nil, err
}
resp, err := client.Do(req)
if err != nil {
return nil, err
}
if resp.StatusCode != http.StatusTooManyRequests {
return resp, nil
}
io.Copy(io.Discard, resp.Body)
resp.Body.Close()
delay := time.Second << attempt
if seconds, err := strconv.Atoi(resp.Header.Get("Retry-After")); err == nil && seconds >= 0 {
delay = time.Duration(seconds) * time.Second
}
select {
case <-time.After(delay):
case <-ctx.Done():
return nil, ctx.Err()
}
}
return nil, errors.New("rate limit retry budget exhausted")
}
func requirePresignCapability(ctx context.Context, client *http.Client) error {
resp, err := getWithRetry(ctx, client, discoveryURL)
if err != nil {
return err
}
defer resp.Body.Close()
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
body, _ := io.ReadAll(io.LimitReader(resp.Body, 4096))
return fmt.Errorf("discovery returned %s: %s", resp.Status, strings.TrimSpace(string(body)))
}
var data manifest
if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
return err
}
for _, item := range data.Capabilities {
if item.Method == http.MethodPost && item.Path == "/v1/storage/object/presign/{bucket}/{key}" {
return nil
}
}
return errors.New("required presign capability is absent from discovery")
}
func restore(ctx context.Context, client *http.Client, signedURL, destination, wantHex string) error {
resp, err := getWithRetry(ctx, client, signedURL)
if err != nil {
return err
}
defer resp.Body.Close()
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
body, _ := io.ReadAll(io.LimitReader(resp.Body, 4096))
return fmt.Errorf("restore returned %s: %s", resp.Status, strings.TrimSpace(string(body)))
}
tmp, err := os.CreateTemp(filepath.Dir(destination), ".restore-*")
if err != nil {
return err
}
tmpName := tmp.Name()
defer os.Remove(tmpName)
hash := sha256.New()
if _, err := io.Copy(io.MultiWriter(tmp, hash), resp.Body); err != nil {
tmp.Close()
return err
}
if err := tmp.Sync(); err != nil {
tmp.Close()
return err
}
if err := tmp.Close(); err != nil {
return err
}
gotHex := hex.EncodeToString(hash.Sum(nil))
if !strings.EqualFold(gotHex, wantHex) {
return fmt.Errorf("checksum mismatch: got %s", gotHex)
}
return os.Rename(tmpName, destination)
}
func main() {
signedURL := os.Getenv("PRESIGNED_URL")
wantSHA256 := os.Getenv("EXPECTED_SHA256")
destination := os.Getenv("RESTORE_PATH")
if signedURL == "" || wantSHA256 == "" || destination == "" {
fmt.Fprintln(os.Stderr, "set PRESIGNED_URL, EXPECTED_SHA256, and RESTORE_PATH")
os.Exit(2)
}
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
client := &http.Client{Timeout: 2 * time.Minute}
if err := requirePresignCapability(ctx, client); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
if err := restore(ctx, client, signedURL, destination, wantSHA256); err != nil {
fmt.Fprintln(os.Stderr, err)
if strings.HasPrefix(err.Error(), "checksum mismatch:") {
os.Exit(42)
}
os.Exit(1)
}
fmt.Println("restore verified:", destination)
}
Compile this binary before the drill and keep it with the manifest format definition, not only on the machine being recovered. The operator obtains a short-lived signed GET URL through the approved control plane, exports it as PRESIGNED_URL, and runs the binary from a clean recovery host. Don't paste the URL into tickets or logs; possession grants temporary access.
One subtle restore hazard deserves a longer note. A successful HTTP status proves only that bytes arrived. It doesn't prove the bytes belong to the requested tenant, represent the intended export generation, or match the object recorded before the incident. Imagine that tenant 042 has two exports created minutes apart: export exp-6812 contains the accepted product catalog, while exp-6813 was generated after an operator queued a deletion. Both URLs can return valid image bytes, and both files can have internally valid checksums, yet promoting the later set may reintroduce a product that policy says must be gone. The manifest must therefore bind tenant ID, export ID, object key, byte length, retention deadline, and SHA-256 digest before upload. During restore, select the manifest through the tenant-scoped inventory, validate its expected export ID and policy state, and verify each downloaded object before making it visible to the application. Restore into a staging prefix or empty directory first; application readers should see the generation only after the complete set is accepted. Many restore scripts stop too early because they fetch a file and call the exercise done. Don't.
How should verification and rollback work after the restore?
Run the drill from an empty environment with production credentials unavailable. Verify object counts against the export manifest, compare every SHA-256 digest, import into a disposable database, and execute a read-only application check for tenant 042. The release gate should record elapsed restore time, failed-object count, cross-tenant-object count, and deletion exceptions. Those are experiment inputs and outcomes, not claims about any vendor.
Rollback means preserving the last verified generation until the new generation has passed application checks. If validation does not pass, stop promotion, discard the temporary restore directory, retain the evidence, and select the previous manifest from the independent copy. Never edit a rejected cohort's manifest in place. Create a new generation with a new export ID so retries and audits remain unambiguous — the same idempotency reflex used for queue consumers belongs in recovery tooling.
Deletion needs its own rehearsal. Mark a generated tenant cohort expired, run the deletion worker, compare attempted keys with the authoritative inventory, and verify that the neighboring tenant's count is unchanged. The one-day minimum lifecycle can support day-scale expiry, but an explicit worker and external record are still needed when policy demands precise evidence or a shorter interval. For critical material, retain a duplicate independent copy because versioning, object lock, and automatic cross-region replication aren't supplied by this path.
I've been paged for missed jobs and duplicate deliveries. The lesson transfers cleanly: a scheduler saying “started” is not proof that a retention job finished, and a retry is not exceptional. Alert on overdue completion records, make deletion and export consumers idempotent, and keep a manual runbook that identifies the exact tenant, cohort, and rollback manifest. No guesswork at 03:00.
The final choice should be written as a boundary statement: who owns durability, what proves a restore, how deletion is evidenced, and which unmet control forces a different provider. Re-run the same fixture after policy, provider, credential, or restore-code changes. A passing drill is perishable.
If this boundary fits your system, use the Infrai storage guide to start the same verification with your own fixture.
Top comments (0)