Backup restore not working

Hi,

I backed up Brewblox using backup save command. It save a .tar.gz file, which is not acceptable as input, so extracted it on my Mac, zipped it loaded onto my freshly installed Raspberry Pi. Then ran Brewblox backup load and update but no signs of dashboards or other configurations in the web-ui. Apart from that it seems to be working fine.

pi@raspberrypi:~/brewblox $ brewblox-ctl backup load brewblox.zip
INFO docker-compose.yml file not found in backup archive
INFO No datastore files found in backup archive
INFO No Spark files found in backup archive
INFO Updating brewblox…
Do you want to remove old docker images to free disk space? [Y/n]: y
INFO Updating brewblox-ctl…
INFO Updating brewblox-ctl libs…
edge: Pulling from brewblox/brewblox-ctl-lib
Digest: sha256:364b3a220c02b393a4ceef616ea90f5b97bf92de65fa7db7825222ec15e7b81b
Status: Image is up to date for brewblox/brewblox-ctl-lib:edge
docker.io/brewblox/brewblox-ctl-lib:edge
752aa64376c143aed0f627856538213fc26592af2496291a68c7ff448a10fc93
ctl-lib
INFO Checking Avahi config…
INFO Stopping services…
Removing network brewblox_default
WARNING: Network brewblox_default not found.
INFO Migrating configuration files…
INFO Checking .env variables…
INFO Pulling docker images…
Pulling history … done
Pulling ui … done
Pulling eventbus … done
Pulling spark-one … done
Pulling redis … done
Pulling traefik … done
Pulling influx … done
INFO Starting services…
Creating network “brewblox_default” with the default driver
Creating brewblox_traefik_1 … done
Creating brewblox_redis_1 … done
Creating brewblox_ui_1 … done
Creating brewblox_influx_1 … done
Creating brewblox_spark-one_1 … done
Creating brewblox_history_1 … done
Creating brewblox_eventbus_1 … done
INFO Migrating service configuration…
Connecting https://localhost:443/history/history/ping, attempt 1/60
Connecting https://localhost:443/history/history/ping, attempt 2/60
Connecting https://localhost:443/history/history/ping, attempt 3/60
Connecting https://localhost:443/history/history/ping, attempt 4/60
Connecting https://localhost:443/history/history/ping, attempt 5/60
Success!
INFO Updating version number to 0.6.1…
INFO Pruning unused images…
Total reclaimed space: 0B
INFO Pruning unused volumes…
Deleted Volumes:
6e95a53d3ed759d9a5b104d307cca67b628b5fffcadf01f480f28615a3fdb809
6f315f55a21fdb69b5f6caefc88e943f4f6b8c180914ac0ed57066e7e7fa06ee
da3c694887d46aded1d129349117a8b479875d29df0342c30a4fd8c3bc78c0fb
306f6fe88ecb6e395153682fa48dbb38cdb12f151ddda6910c21c9b6a96d163c
5570035a72c32c40452a1d16d65ecf769eba389e9a05596bdce80a69f54ed3c5
bdc0a6ecc7104608cd552339ceac2056dad067945d24078ce20d0164feba62f6
d353c94e69f2337bba3e272655c526a686cbccba3ea48b0fc010dabacc98354c
ae551f10b3779d06a64fd194f7cabe44cf2f1fab95cca418dbd81c301000668a

Total reclaimed space: 0B
INFO Done!
pi@raspberrypi:~/brewblox $ brewblox-ctl update
Do you want to remove old docker images to free disk space? [Y/n]: y
INFO Updating brewblox-ctl…
INFO Updating brewblox-ctl libs…
edge: Pulling from brewblox/brewblox-ctl-lib
Digest: sha256:364b3a220c02b393a4ceef616ea90f5b97bf92de65fa7db7825222ec15e7b81b
Status: Image is up to date for brewblox/brewblox-ctl-lib:edge
docker.io/brewblox/brewblox-ctl-lib:edge
612debd5ceeafec1ebd92bbc7579550ff33d3d2b9ba4677810c1ee5d1d0a0b74
ctl-lib
INFO Checking Avahi config…
INFO Stopping services…
Stopping brewblox_ui_1 … done
Stopping brewblox_traefik_1 … done
Stopping brewblox_eventbus_1 … done
Stopping brewblox_spark-one_1 … done
Stopping brewblox_influx_1 … done
Stopping brewblox_history_1 … done
Stopping brewblox_redis_1 … done
Removing brewblox_ui_1 … done
Removing brewblox_traefik_1 … done
Removing brewblox_eventbus_1 … done
Removing brewblox_spark-one_1 … done
Removing brewblox_influx_1 … done
Removing brewblox_history_1 … done
Removing brewblox_redis_1 … done
Removing network brewblox_default
INFO Migrating configuration files…
INFO Checking .env variables…
INFO Pulling docker images…
Pulling redis … done
Pulling traefik … done
Pulling eventbus … done
Pulling history … done
Pulling spark-one … done
Pulling influx … done
Pulling ui … done
INFO Starting services…
Creating network “brewblox_default” with the default driver
Creating brewblox_redis_1 … done
Creating brewblox_spark-one_1 … done
Creating brewblox_eventbus_1 … done
Creating brewblox_influx_1 … done
Creating brewblox_ui_1 … done
Creating brewblox_history_1 … done
Creating brewblox_traefik_1 … done
INFO Migrating service configuration…
Connecting https://localhost:443/history/history/ping, attempt 1/60
Connecting https://localhost:443/history/history/ping, attempt 2/60
Connecting https://localhost:443/history/history/ping, attempt 3/60
Connecting https://localhost:443/history/history/ping, attempt 4/60
Connecting https://localhost:443/history/history/ping, attempt 5/60
Connecting https://localhost:443/history/history/ping, attempt 6/60
Success!
INFO Updating version number to 0.6.1…
INFO Pruning unused images…
Total reclaimed space: 0B
INFO Pruning unused volumes…
Deleted Volumes:
8c7c7ad5c31f8753a8d5c4f4f20cd784609d1a109e7faf99dd58546c0a456976
c188beda88f46ba0cec3a0d139c50cc39f4721f836e6bafddffe4dcf0fa8e753

Total reclaimed space: 0B
pi@raspberrypi:~/brewblox $

What is the content of the archive? brewblox-ctl snapshot save is the one that generates a .tar.gz file.

Hi,

Saved the contents into a text-file, see attached.
brewblox_files.txt (85.6 KB)

Is this the contents of the brewblox dir, or the .tar.gz archive?

This will list files in archive:

tar -tvf brewblox.tar.gz

Hi,

It was the contents after unzipping it, this is the tar contents.
brewblox_files2.txt (117.8 KB)

Ah ok. This is indeed the output from brewblox-ctl snapshot save. You can load it with brewblox-ctl snapshot load if you’re sure this is up-to-date.

Backup files can be found in the brewblox/backup/ directory, and include a timestamp in the file name.

The snapshot loaded ok but now it seems I have two competing projects. Any way to remove one of them or start fresh before I restore the snapshot?

ERROR: for traefik Cannot start service traefik: driver failed programming external connectivity on endpoint brewblox_traefik_1 (1b15bd3518130e2394bb6358c3192c5b0c1d334ea2b727da53ca6471ff43f637): Bind for 0.0.0.0:443 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

Command ‘docker-compose up -d’ returned non-zero exit status 1.

Command ‘/usr/bin/python3 /home/pi/.local/bin/brewblox-ctl update --update-ctl-done --prune’ returned non-zero exit status 1.

brewblox-ctl kill will remove all docker containers currently running.

Loading a snapshot will wipe and recreate the brewblox directory to ensure a clean import.

Edit: if you still get errors about port being claimed after running kill, see this post: Salvage old brewblox data

Thanks, now up and running again!