I made a fresh install after backup of my sparkbox and then restore but everything's gone...
7 replies
Chris wrote:
Hey mdma, sorry for the scare — this is usually fixable, not real data loss. Backups are encrypted with a key that lives in the .env file on the install that MADE the backup (the line SBBACKUPKEY, or SBSESSIONSECRET if that's not set). A brand-new install generates its own new key, so restoring an old backup onto it can't decrypt anything, which looks exactly like everything's gone. If you still have access to the old install's .env, copy that key line into the new install's .env, run sudo sparkbox up, then retry the restore. If that's not quite your situation, or you saw a specific error message, reply here with details and I'll dig deeper — flagging this to Tom too.
mdma wrote:
I did an uncrypted backup via ssh
Chris wrote:
Thanks for the extra detail, mdma - that actually rules out the key-mismatch idea, since a manual/CLI backup like that was never encrypted to begin with, so no key is needed to read it back. What's really happening: restoring onto a brand-new install does correctly copy your files over, but it doesn't update where the apps are told to look for photos, media, and documents - so they end up pointed at an empty folder instead of the one your data landed in. This is a known gap our dev team is already working on. Run sudo sparkbox doctor and reply here with what it shows next to MEDIAROOT, and I'll help you point things at the right folder in the meantime.
mdma wrote:
Sparkbox shows no containers, nginx is blank, the certificate is gone SparkBox v1.6.517 - Self-Hosted Privacy Stack Created by Tom Spark | youtube.com/@TomSparkReviews Environment: NAS (ugreen) SparkBox Doctor Running diagnostics... [Install location] [OK] SparkBox is installed at: /opt/sparkbox [OK] Settings file (.env): /opt/sparkbox/.env [OK] Media library folder (MEDIAROOT): /volume1/sparkbox-data/media [Docker] [OK] Docker daemon is accessible [OK] Docker version: Docker version 29.4.3, build 055a478 [OK] Docker Compose: 5.1.3 [Docker Socket] [OK] Docker socket exists at /var/run/docker.sock [OK] Docker socket is readable [User IDs] [INFO] Current user: root (UID=0, GID=0) [OK] PUID=1000 (containers run as UID 1000) [OK] PGID=10 (containers run as GID 10) [Container Egress] [OK] Apps can reach webhook.tomsparkbox.com over sbproxy (their real network) [OK] Docker's default bridge can reach tomsparkbox.com (dashboard Update button) [Port Conflicts] [OK] Port 8080: in use by SparkBox (sb-npm) [OK] Port 8444: in use by SparkBox (sb-npm) [OK] Port 8443: in use by SparkBox (sb-dashboard) [OK] Port 9000: in use by SparkBox (sb-portainer) [Portainer Auth] [OK] Portainer admin login verified (HTTP 200) [VPN Tunnel] [INFO] sb-gluetun not deployed — media stack not installed (or VPN module skipped) [Hardware Transcoding] [OK] /dev/dri exists -- GPU devices detected total 0 drwxr-xr-x 3 root root 100 Aug 4 13:53 . drwxr-xr-x 20 root root 7960 Aug 4 13:54 .. drwxr-xr-x 2 root root 80 Aug 4 13:53 by-path crw-rw---- 1 root video 226, 0 Aug 4 13:53 card0 crw-rw---- 1 root render 226, 128 Aug 4 13:53 renderD128 [OK] Intel Quick Sync / GPU render device available (renderD128) [OK] Render device is accessible by current user [Media Storage] [OK] MEDIAROOT=/volume1/sparkbox-data/media exists [OK] MEDIAROOT is writable [OK] Your apps (user id 1000) can read your media library [INFO] Free space at MEDIAROOT: 843GB [System Resources] [INFO] Total RAM: 39884MB [INFO] Available RAM: 32658MB [OK] RAM looks sufficient for 2 enabled modules [INFO] Free disk at SBROOT: 96GB [NAS-Specific] [INFO] NAS type: ugreen [INFO] Install directory: /opt/sparkbox [WARN] Install directory is on system partition -- consider moving to a data volume There is no one-shot move command. The supported route is: 1. sudo sparkbox backup 2. copy the archive somewhere off this partition 3. re-install with: --install-dir <path on your data volume 4. sudo sparkbox restore <archive Restore now rewrites SBROOT in the settings file to the new location. [Container Health] [OK] All SparkBox containers are running and passing their health checks ============================================ All checks passed!
Chris wrote:
Thanks for pasting that - it actually points somewhere useful. Doctor shows everything as healthy now, including your media folder, which suggests the restore hit a snag partway through and quietly fell back to starting fresh rather than actually applying your backup - that would explain why nginx and the certificate look untouched (they were never restored). Can you tell me: when you originally ran the restore, did it show any error on screen, or did it say it finished successfully? That tells us whether it's worth trying again or something else is going on. Flagging this to Tom either way.
mdma wrote:
backup was sucessful. Sashboard acts like there was no restore operation
Chris wrote:
Thanks for confirming the backup itself was good, mdma. Can you walk me through exactly how you kicked off the restore? If you used the dashboard's Backup screen, did it show a progress bar or a "done" message when you clicked restore, or did nothing visibly happen? If you used a terminal command instead, what did it print at the end? Doctor is showing a clean, working install with nothing from your old box on it, so it's looking like the restore step itself may not have actually run yet, rather than it running and wiping anything. Once I know how you triggered it I can point you at the right next step.