backblaze-personal-wine-container icon indicating copy to clipboard operation
backblaze-personal-wine-container copied to clipboard

Feature Request: (Auto) Update Functionality

Open monteroman opened this issue 3 years ago • 5 comments

Hi there. Will the container be updated for the 8.0.1.577 version update or is there a process to update the client?

Thanks for making this!!

monteroman avatar Feb 09 '22 11:02 monteroman

Updates are something I will need to look into. I assumed the Backblaze Client had a built-in updater, but it doesn't so I will have to find a solution. The docker image does not include the installer and therefore does not include a specific version. It gets downloaded automatically on the first start. But that never happens again unless you uninstall Backblaze, which also remove the configuration, so that is definitely not the solution. I think the best option is to write a update script, that downloads and runs the newest installer, which can be started from the command line of the docker.

JonathanTreffler avatar Feb 09 '22 22:02 JonathanTreffler

I am documenting my findings in this issue:

There is a command to get the current version:

docker exec --user app backblaze_personal_backup wine /config/wine/drive_c/Program\ Files\ \(x86\)/Backblaze/bztransmit64.exe -version

The same executable also has an auto-update option: (I am not sure if this is supposed to update this specific component of Backblaze or everything Personal Backup includes)

docker exec --user app backblaze_personal_backup wine /config/wine/drive_c/Program\ Files\ \(x86\)/Backblaze/bztransmit64.exe -downloadautoupdateifappropriate 

But I could not get it to work so far. Logs:

20220209002311 - starting bztransmit
20220209002311 - bztransmit_processid=908, my_bztransmit_version=8.0.1.571, numMBytesStartMemSize=14, called with args: arg1=-downloadautoupdateifappropriate 
20220209002311 - DownloadAndRunAutoUpdateIfAppropriate - processid=908 grabbed one day lock, starting check for download....
20220209002311 - FallbackHttpsPostSucceededYippee_not_batch for old_fguid=****removed, because I don't know if it is personal information****, fallbackFguidStr=****removed, because I don't know if it is personal information****, fallbackCvt=****removed, because I don't know if it is personal information****
20220209002311 - DownloadAndRunAutoUpdateIfAppropriate - found in clientversion.xml hguid_list=g
20220209002311 - DownloadAndRunAutoUpdateIfAppropriate - my hguid (1) not in hguid_list=g, so SKIPPING auto-update for now.

JonathanTreffler avatar Feb 09 '22 23:02 JonathanTreffler

I found the following in the official documentation: https://help.backblaze.com/hc/en-us/articles/217665068-How-do-I-update-Backblaze-

  • Periodically, Backblaze will automatically update all users to the newest version of Backblaze. No action is required from the user.

My Personal Backup Installation using this docker has not done this yet, but maybe this whole update thing is a non-issue.

JonathanTreffler avatar Feb 09 '22 23:02 JonathanTreffler

What I currently do to update the Backblaze client: connect into the container's bash with the user "app" (via portainer)

cd /config/wine/dosdevices/c\:/
curl -L "https://www.backblaze.com/win32/install_backblaze.exe" --output "install_backblaze.exe"
wine64 "install_backblaze.exe"

This starts the setup, after clicking "install" everything gets updated and the client (bzbui.exe) starts and continues backup.

Automatic updates never happened, at least with my installation.

traktuner avatar May 11 '22 09:05 traktuner

What I currently do to update the Backblaze client: connect into the container's bash with the user "app" (via portainer)

cd /config/wine/dosdevices/c\:/
curl -L "https://www.backblaze.com/win32/install_backblaze.exe" --output "install_backblaze.exe"
wine64 "install_backblaze.exe"

This starts the setup, after clicking "install" everything gets updated and the client (bzbui.exe) starts and continues backup.

Automatic updates never happened, at least with my installation.

I just tried that with my installation and it worked as expected. In a future release this could be added to the docker as a script, that could be run with a single command. I still think that Backblaze can trigger updates remotely and without user interaction, but they only seem to do so for big updates and not small patches.

JonathanTreffler avatar Jun 07 '22 15:06 JonathanTreffler

I think the easiest way to update is to just pull the latest container, no?

henryyeh avatar Oct 24 '23 20:10 henryyeh

I think the easiest way to update is to just pull the latest container, no?

That will not update the Backblaze Application, only the dependencies on the Linux side like wine. The Backblaze version is determined by the first start of the container, where the newest available version is downloaded from Backblaze. This is because I don't want to redistribute Backblazes executables within the container image.

JonathanTreffler avatar Oct 24 '23 21:10 JonathanTreffler

I think the easiest way to update is to just pull the latest container, no?

That will not update the Backblaze Application, only the dependencies on the Linux side like wine. The Backblaze version is determined by the first start of the container, where the newest available version is downloaded from Backblaze. This is because I don't want to redistribute Backblazes executables within the container image.

Doesn't it pull the latest Backblaze installer and update to latest on launch though?

henryyeh avatar Oct 24 '23 21:10 henryyeh

I think the easiest way to update is to just pull the latest container, no?

That will not update the Backblaze Application, only the dependencies on the Linux side like wine. The Backblaze version is determined by the first start of the container, where the newest available version is downloaded from Backblaze. This is because I don't want to redistribute Backblazes executables within the container image.

Doesn't it pull the latest Backblaze installer and update to latest on launch though?

Only if the Backblaze Application could not be detected.

JonathanTreffler avatar Oct 24 '23 21:10 JonathanTreffler

Only if the Backblaze Application could not be detected.

That makes sense. Thanks for the explanation. And thank you so much for working on this, much appreciated.

henryyeh avatar Oct 24 '23 21:10 henryyeh

Has anyone been able to install the latest beta using this method? I downloaded the beta from https://www.backblaze.com/status/backup-beta but I get the following when I try to install it app@514a7b7e82a5:/config/wine$ wine64 "install_backblaze.exe" wine: could not open working directory L"unix\\config\\wine\\", starting in the Windows directory. Application could not be started, or no application associated with the specified file. ShellExecuteEx failed: File not found. Using ubuntu20 v1.6 from two days ago. I can't load winecfg either.

smccloud avatar Jan 24 '24 01:01 smccloud

Is the non-beta working OK for you? please post the command you used to download the installer (including log output) and also the full log when starting the docker container. Thank you!

traktuner avatar Jan 24 '24 06:01 traktuner

Non-beta works, but it has an upload bug where it keeps uploading the same files and over and over and you can't restore those files. To download and run the installer, I used cd /config/wine/dosdevices/c\:/ curl -L "https://f000.backblazeb2.com/file/b2-computer-backup-public/windows/beta/install_backblaze.exe" --output "install_backblaze.exe" wine64 "install_backblaze.exe"

Startup log

backblaze_personal_backup [init ] container is starting... [cont-env ] loading container environment variables... [cont-env ] APP_NAME: loading... [cont-env ] DISPLAY: executing... [cont-env ] DISPLAY: terminated successfully. [cont-env ] DISPLAY: loading... [cont-env ] DOCKER_IMAGE_PLATFORM: loading... [cont-env ] GTK2_RC_FILES: executing... [cont-env ] GTK2_RC_FILES: terminated successfully. [cont-env ] GTK2_RC_FILES: loading... [cont-env ] GTK_THEME: executing... [cont-env ] GTK_THEME: terminated successfully. [cont-env ] GTK_THEME: loading... [cont-env ] HOME: loading... [cont-env ] QT_STYLE_OVERRIDE: executing... [cont-env ] QT_STYLE_OVERRIDE: terminated successfully. [cont-env ] QT_STYLE_OVERRIDE: loading... [cont-env ] TAKE_CONFIG_OWNERSHIP: loading... [cont-env ] XDG_CACHE_HOME: loading... [cont-env ] XDG_CONFIG_HOME: loading... [cont-env ] XDG_DATA_HOME: loading... [cont-env ] XDG_RUNTIME_DIR: loading... [cont-env ] XDG_STATE_HOME: loading... [cont-env ] container environment variables initialized. [cont-secrets] loading container secrets... [cont-secrets] container secrets loaded. [cont-init ] executing container initialization scripts... [cont-init ] 10-certs.sh: executing... [cont-init ] 10-certs.sh: terminated successfully. [cont-init ] 10-check-app-niceness.sh: executing... [cont-init ] 10-check-app-niceness.sh: terminated successfully. [cont-init ] 10-clean-logmonitor-states.sh: executing... [cont-init ] 10-clean-logmonitor-states.sh: terminated successfully. [cont-init ] 10-clean-tmp-dir.sh: executing... [cont-init ] 10-clean-tmp-dir.sh: terminated successfully. [cont-init ] 10-fontconfig-cache-dir.sh: executing... [cont-init ] 10-fontconfig-cache-dir.sh: terminated successfully. [cont-init ] 10-init-users.sh: executing... [cont-init ] 10-init-users.sh: terminated successfully. [cont-init ] 10-nginx.sh: executing... [cont-init ] 10-nginx.sh: terminated successfully. [cont-init ] 10-openbox.sh: executing... [cont-init ] 10-openbox.sh: terminated successfully. [cont-init ] 10-pkgs-mirror.sh: executing... [cont-init ] 10-pkgs-mirror.sh: terminated successfully. [cont-init ] 10-set-tmp-dir-perms.sh: executing... [cont-init ] 10-set-tmp-dir-perms.sh: terminated successfully. [cont-init ] 10-vnc-password.sh: executing... [cont-init ] 10-vnc-password.sh: terminated successfully. [cont-init ] 10-web-data.sh: executing... [cont-init ] 10-web-data.sh: terminated successfully. [cont-init ] 10-x11-unix.sh: executing... [cont-init ] 10-x11-unix.sh: terminated successfully. [cont-init ] 10-xdg-runtime-dir.sh: executing... [cont-init ] 10-xdg-runtime-dir.sh: terminated successfully. [cont-init ] 15-cjk-font.sh: executing... [cont-init ] 15-cjk-font.sh: terminated successfully. [cont-init ] 15-install-pkgs.sh: executing... [cont-init ] 15-install-pkgs.sh: terminated successfully. [cont-init ] 85-take-config-ownership.sh: executing... [cont-init ] 85-take-config-ownership.sh: terminated successfully. [cont-init ] 89-info.sh: executing... ╭――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╮ │ │ │ Application: Backblaze Personal Backup │ │ Application Version: n/a │ │ Docker Image Version: n/a │ │ Docker Image Platform: linux/amd64 │ │ │ ╰――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╯ [cont-init ] 89-info.sh: terminated successfully. [cont-init ] all container initialization scripts executed. [init ] giving control to process supervisor. [supervisor ] loading services... [supervisor ] loading service 'default'... [supervisor ] loading service 'app'... [supervisor ] loading service 'gui'... [supervisor ] loading service 'certsmonitor'... [supervisor ] service 'certsmonitor' is disabled. [supervisor ] loading service 'nginx'... [supervisor ] loading service 'xvnc'... [supervisor ] loading service 'openbox'... [supervisor ] loading service 'logmonitor'... [supervisor ] service 'logmonitor' is disabled. [supervisor ] loading service 'logrotate'... [supervisor ] all services loaded. [supervisor ] starting services... [supervisor ] starting service 'xvnc'... [xvnc ] Xvnc TigerVNC 1.13.1 - built Dec 21 2023 00:39:59 [xvnc ] Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst) [xvnc ] See https://www.tigervnc.org for information on TigerVNC. [xvnc ] Underlying X server release 12014000 [xvnc ] Wed Jan 24 09:16:56 2024 [xvnc ] vncext: VNC extension running! [xvnc ] vncext: Listening for VNC connections on /tmp/vnc.sock (mode 0660) [xvnc ] vncext: Listening for VNC connections on all interface(s), port 5900 [xvnc ] vncext: created VNC server for screen 0 [supervisor ] starting service 'nginx'... [nginx ] Listening for HTTP connections on port 5800. [supervisor ] starting service 'openbox'... [supervisor ] starting service 'app'... [app ] + cat /RELEASE_VERSION [app ] + release_version=v1.6 [app ] + local_version_file=/config/wine//dosdevices/c:/ProgramData/Backblaze/bzdata/bzreports/bzserv_version.txt [app ] + install_exe_path=/config/wine//dosdevices/c:/ [app ] + log_file=/config/wine//dosdevices/c:/backblaze-wine-startapp.log [app ] + custom_user_agent=backblaze-personal-wine/v1.6 (JonathanTreffler, +https://github.com/JonathanTreffler/backblaze-personal-wine-container), CFNetwork [app ] + pinned_bz_version_file=/PINNED_BZ_VERSION [app ] + sed -n 1p /PINNED_BZ_VERSION [app ] + pinned_bz_version=9.0.0.749 [app ] + sed -n 2p /PINNED_BZ_VERSION [app ] + pinned_bz_version_url=https://web.archive.org/web/20231218152237/https://secure.backblaze.com/win32/install_backblaze.exe [app ] + export WINEARCH=win64 [app ] + disclaimer_updatemode [app ] + [ false = true ] [app ] + [ True = true ] [app ] + echo FORCE_LATEST_UPDATE is disabled. Using known-good version of Backblaze. [app ] FORCE_LATEST_UPDATE is disabled. Using known-good version of Backblaze. [app ] + [ -f /config/wine/drive_c/Program Files (x86)/Backblaze/bzbui.exe ] [app ] + [ false = true ] [app ] + [ True = true ] [app ] + [ -f /config/wine//dosdevices/c:/ProgramData/Backblaze/bzdata/bzreports/bzserv_version.txt ] [app ] + log_message UPDATER: FORCE_LATEST_UPDATE=false, Checking if newer version than /config/wine//dosdevices/c:/ProgramData/Backblaze/bzdata/bzreports/bzserv_version.txt is available. [app ] + date [app ] + echo Wed 24 Jan 2024 09:16:58 AM CST: UPDATER: FORCE_LATEST_UPDATE=false, Checking if newer version than /config/wine//dosdevices/c:/ProgramData/Backblaze/bzdata/bzreports/bzserv_version.txt is available. [app ] + cat /config/wine//dosdevices/c:/ProgramData/Backblaze/bzdata/bzreports/bzserv_version.txt [app ] + local_version=9.0.0.749 [app ] + compare_versions 9.0.0.749 9.0.0.749 [app ] + local_version=9.0.0.749 [app ] + compare_version=9.0.0.749 [app ] + dpkg --compare-versions 9.0.0.749 lt 9.0.0.749 [app ] + log_message UPDATER: COMPARE: no new version found - local 9.0.0.749 - remote 9.0.0.749 [app ] + date [app ] + echo Wed 24 Jan 2024 09:16:58 AM CST: UPDATER: COMPARE: no new version found - local 9.0.0.749 - remote 9.0.0.749 [app ] + return 1 [app ] + log_message UPDATER: FORCE_LATEST_UPDATE=false, The local version is up to date. There may be a newer version available when using FORCE_LATEST_UPDATE=true [app ] + date [app ] + echo Wed 24 Jan 2024 09:16:58 AM CST: UPDATER: FORCE_LATEST_UPDATE=false, The local version is up to date. There may be a newer version available when using FORCE_LATEST_UPDATE=true [app ] + start_app [app ] + log_message STARTAPP: Starting Backblaze version /config/wine//dosdevices/c:/ProgramData/Backblaze/bzdata/bzreports/bzserv_version.txt [app ] + date [app ] + echo Wed 24 Jan 2024 09:16:58 AM CST: STARTAPP: Starting Backblaze version /config/wine//dosdevices/c:/ProgramData/Backblaze/bzdata/bzreports/bzserv_version.txt [app ] + sleep infinity [app ] + wine64 /config/wine/drive_c/Program Files (x86)/Backblaze/bzbui.exe -noqiet [supervisor ] all services started. [app ] wine: could not open working directory L"unix\etc\services.d\app\", starting in the Windows directory. [app ] wine: could not open working directory L"unix\etc\services.d\app\", starting in the Windows directory.

smccloud avatar Jan 24 '24 15:01 smccloud

Non-beta works, but it has an upload bug where it keeps uploading the same files and over and over and you can't restore those files. To download and run the installer, I used cd /config/wine/dosdevices/c\:/ curl -L "https://f000.backblazeb2.com/file/b2-computer-backup-public/windows/beta/install_backblaze.exe" --output "install_backblaze.exe" wine64 "install_backblaze.exe"

Thank you for the additional information! I tried some things in my testenvironment and figured out, that the old method (mentioned in https://github.com/JonathanTreffler/backblaze-personal-wine-container/issues/5#issuecomment-1123403019 ) does not work anymore. The reason is that the docker-baseimage we are using got some major updates in the meantime. Please wait for the beta version to be released officially and set the environment variable FORCE_LATEST_UPDATE=true as described here: https://github.com/JonathanTreffler/backblaze-personal-wine-container#environment-variables Then the container will always check for the latest available version at start. You will then see the installer and can proceed with the update. I may add the option to install the latest beta (with and additional environment variable) in the future when I have time.

traktuner avatar Jan 25 '24 07:01 traktuner

Non-beta works, but it has an upload bug where it keeps uploading the same files and over and over and you can't restore those files. To download and run the installer, I used cd /config/wine/dosdevices/c\:/ curl -L "https://f000.backblazeb2.com/file/b2-computer-backup-public/windows/beta/install_backblaze.exe" --output "install_backblaze.exe" wine64 "install_backblaze.exe"

Thank you for the additional information! I tried some things in my testenvironment and figured out, that the old method (mentioned in #5 (comment) ) does not work anymore. The reason is that the docker-baseimage we are using got some major updates in the meantime. Please wait for the beta version to be released officially and set the environment variable FORCE_LATEST_UPDATE=true as described here: https://github.com/JonathanTreffler/backblaze-personal-wine-container#environment-variables Then the container will always check for the latest available version at start. You will then see the installer and can proceed with the update. I may add the option to install the latest beta (with and additional environment variable) in the future when I have time.

The ability to run winecfg again would be nice though, even though I can see the start button, I can't see the system tray area. Which means restores will be "difficult" at best. And the UNRAID template has yet to be updated with the new fields.

smccloud avatar Jan 26 '24 00:01 smccloud