From 1a5bc1d347cb451e696b83e1e8c8021214f51376 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 May 2023 06:57:36 +0000 Subject: [PATCH 01/14] Bump codecov/codecov-action from 3.1.3 to 3.1.4 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.3 to 3.1.4. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v3.1.3...v3.1.4) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/pytest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 9c75b575..c285ed91 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -41,7 +41,7 @@ jobs: with: files: junit/**/*.xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3.1.3 + uses: codecov/codecov-action@v3.1.4 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml From abeebebdfa641c12f114ee67fd5aafdd354fed53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 May 2023 06:58:27 +0000 Subject: [PATCH 02/14] Bump frenck/action-addon-linter from 2.11 to 2.13 Bumps [frenck/action-addon-linter](https://github.com/frenck/action-addon-linter) from 2.11 to 2.13. - [Release notes](https://github.com/frenck/action-addon-linter/releases) - [Commits](https://github.com/frenck/action-addon-linter/compare/v2.11...v2.13) --- updated-dependencies: - dependency-name: frenck/action-addon-linter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index b1f54200..c973fd45 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -8,6 +8,6 @@ jobs: - name: ⤵️ Check out code from GitHub uses: actions/checkout@v3 - name: 🚀 Run Home Assistant Add-on Linter - uses: frenck/action-addon-linter@v2.11 + uses: frenck/action-addon-linter@v2.13 with: path: "./hassio-google-drive-backup" From b0a412869bc9cac79949db6f9f92b1e4f68a0126 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Jun 2023 06:57:31 +0000 Subject: [PATCH 03/14] Bump docker/login-action from 2.1.0 to 2.2.0 Bumps [docker/login-action](https://github.com/docker/login-action) from 2.1.0 to 2.2.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v2.1.0...v2.2.0) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/prod_push.yaml | 2 +- .github/workflows/test_staging_push.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prod_push.yaml b/.github/workflows/prod_push.yaml index abff5bcd..afeb6165 100644 --- a/.github/workflows/prod_push.yaml +++ b/.github/workflows/prod_push.yaml @@ -18,7 +18,7 @@ jobs: persist-credentials: false - name: Login to DockerHub - uses: docker/login-action@v2.1.0 + uses: docker/login-action@v2.2.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} diff --git a/.github/workflows/test_staging_push.yml b/.github/workflows/test_staging_push.yml index 0c21114a..0049ded2 100644 --- a/.github/workflows/test_staging_push.yml +++ b/.github/workflows/test_staging_push.yml @@ -33,7 +33,7 @@ jobs: python3 staging/update.py dev staging - name: Login to DockerHub - uses: docker/login-action@v2.1.0 + uses: docker/login-action@v2.2.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} From f55390bf2e26e3b28d6a9ce4587e119d58db4b73 Mon Sep 17 00:00:00 2001 From: Stephen Beechen Date: Sun, 16 Jul 2023 11:47:47 -0600 Subject: [PATCH 04/14] Add readme about supervisor logs --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 537f07ba..e1fdedb4 100644 --- a/README.md +++ b/README.md @@ -265,3 +265,15 @@ The add-on will only delete an old backup if a new one exists to replace it, so ### Can I exclude specific sub-folders from my backup? The add-on uses the supervisor to create backups, and the supervisor only permits you to include or exclude the 5 main folders (home assistant configuration, share, SSL, media, and local add-ons). Excluding specific subfolders, or only including specific subfolders from a backup isn't possible today. + +### I'm getting weird errors. Where do I look for more detils about an error (Supervisor logs). + +The addon uses Home Assistant's "supervisor" to create and delete backups on Home Asisstant's side. In case you don't know, the supervisor is something that runs in the background on Home Assistant and manages stuff like backups, connections to hardware, and setting up the environment that Home Assistant Core (eg the UI) and addons run in. Because of this a lot of errors you run into (problems with the NAS, HD corruption, etc) only show up in the supervisor's logs. The supervisor's logs are kind of hidden by default, to view them: + +- Go to your Home Assistant user profile by clicking the user icon in the bottom left of Home Assistant's main UI. +- Enable "Advanced Mode" in your profile. +- Navigate to Settings > System > Logs +- Select "Supervisor" from the drop down at the top right of the page. + +The logs there keep a pretty short history, so if you ahve a lot of other errors/warnings happening (which is common) you mgiht need to go check the logs right after you see errors in the addon. + From 7cb5fee5f113648f40f3b73f67c8517ff7f60006 Mon Sep 17 00:00:00 2001 From: Stephen Beechen Date: Sun, 3 Sep 2023 16:36:30 -0600 Subject: [PATCH 05/14] Add heroku config --- .devcontainer/Dockerfile | 19 ++++++++++++++++++- .devcontainer/devcontainer.json | 4 +++- heroku.yml | 3 +++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 heroku.yml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 35c44e4e..379172e1 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -5,6 +5,23 @@ RUN apt-get update RUN apt-get install fping # install gcloud api RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && apt-get install google-cloud-cli -y - + +# Install Docker CE CLI +RUN apt-get update \ + && apt-get install -y apt-transport-https ca-certificates curl gnupg2 lsb-release \ + && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null \ + && echo "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list \ + && apt-get update \ + && apt-get install -y docker-ce-cli + +# Install Docker Compose +RUN LATEST_COMPOSE_VERSION=$(curl -sSL "https://api.github.com/repos/docker/compose/releases/latest" | grep -o -P '(?<="tag_name": ").+(?=")') \ + && curl -sSL "https://github.com/docker/compose/releases/download/${LATEST_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \ + && chmod +x /usr/local/bin/docker-compose + +# Install Heoku CLI +RUN curl https://cli-assets.heroku.com/install-ubuntu.sh | sh + +# Install app dependencies COPY requirements-dev.txt ./ RUN pip install --no-cache-dir -r requirements-dev.txt \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 70495e6b..a4d8888f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,7 @@ { "build": { "dockerfile": "Dockerfile" }, + "runArgs": ["--init", "--privileged"], "extensions": ["ms-python.python", "wholroyd.jinja","ms-python.vscode-pylance"], - "forwardPorts": [3000] + "forwardPorts": [3000], + "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ] } \ No newline at end of file diff --git a/heroku.yml b/heroku.yml new file mode 100644 index 00000000..f3682ee8 --- /dev/null +++ b/heroku.yml @@ -0,0 +1,3 @@ +build: + docker: + hgdb: hassio-google-drive-backup\Dockerfile-server \ No newline at end of file From 1bd5779bbb4b79f104f110cecb5f04767f1b13d8 Mon Sep 17 00:00:00 2001 From: Stephen Beechen Date: Sun, 3 Sep 2023 16:39:23 -0600 Subject: [PATCH 06/14] Used the wrong slash --- heroku.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heroku.yml b/heroku.yml index f3682ee8..14132590 100644 --- a/heroku.yml +++ b/heroku.yml @@ -1,3 +1,3 @@ build: docker: - hgdb: hassio-google-drive-backup\Dockerfile-server \ No newline at end of file + hgdb: hassio-google-drive-backup/Dockerfile-server \ No newline at end of file From 31dbb6aa40de5035780801f1ff425ec78d67ce08 Mon Sep 17 00:00:00 2001 From: Stephen Beechen Date: Sun, 3 Sep 2023 16:51:28 -0600 Subject: [PATCH 07/14] I guess this _must_ be called web --- heroku.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heroku.yml b/heroku.yml index 14132590..b88ba005 100644 --- a/heroku.yml +++ b/heroku.yml @@ -1,3 +1,3 @@ build: docker: - hgdb: hassio-google-drive-backup/Dockerfile-server \ No newline at end of file + web: hassio-google-drive-backup/Dockerfile-server \ No newline at end of file From 387c4ec96a8db5dd2b72d988e3d835ccb3489315 Mon Sep 17 00:00:00 2001 From: Stephen Beechen Date: Mon, 4 Sep 2023 13:48:55 -0600 Subject: [PATCH 08/14] Include server time in error reports --- .../backup/server/server.py | 25 ++++++++----------- .../tests/test_server.py | 11 +++++++- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/hassio-google-drive-backup/backup/server/server.py b/hassio-google-drive-backup/backup/server/server.py index b092acf9..bad3bcaa 100644 --- a/hassio-google-drive-backup/backup/server/server.py +++ b/hassio-google-drive-backup/backup/server/server.py @@ -15,6 +15,7 @@ from yarl import URL from backup.config import Version from urllib.parse import unquote +from backup.time import Time NEW_AUTH_MINIMUM = Version(0, 101, 3) @@ -26,7 +27,9 @@ def __init__(self, config: Config, exchanger_builder: ClassAssistedBuilder[Exchanger], logger: CloudLogger, - error_store: ErrorStore): + error_store: ErrorStore, + time: Time): + self._time = time self.exchanger = exchanger_builder.build( client_id=config.get(Setting.DEFAULT_DRIVE_CLIENT_ID), client_secret=config.get(Setting.DEFAULT_DRIVE_CLIENT_SECRET), @@ -128,14 +131,6 @@ async def refresh(self, request: Request): return json_response({ "error": "Couldn't connect to Google's servers" }, status=503) - except ServerDisconnectedError: - return json_response({ - "error": "Couldn't connect to Google's servers" - }, status=503) - except ServerTimeoutError: - return json_response({ - "error": "Google's servers timed out" - }, status=503) except GoogleCredentialsExpired: return json_response({ "error": "expired" @@ -203,16 +198,18 @@ def logError(self, request: Request, exception: Exception): self.logger.log_struct(data) def logReport(self, request, report): - data = self.getRequestInfo(request) + data = self.getRequestInfo(request, include_timestamp=True) data['report'] = report - self.logger.log_struct(data) self.error_store.store(data) - def getRequestInfo(self, request: Request): - return { + def getRequestInfo(self, request: Request, include_timestamp=False): + data = { 'client': request.headers.get('client', "unknown"), 'version': request.headers.get('addon_version', "unknown"), 'address': request.remote, 'url': str(request.url), - 'length': request.content_length + 'length': request.content_length, } + if include_timestamp: + data['server_time'] = self._time.now() + return data diff --git a/hassio-google-drive-backup/tests/test_server.py b/hassio-google-drive-backup/tests/test_server.py index 9f88bc1f..b530d989 100644 --- a/hassio-google-drive-backup/tests/test_server.py +++ b/hassio-google-drive-backup/tests/test_server.py @@ -4,7 +4,8 @@ from dev.simulationserver import SimulationServer from aiohttp import ClientSession, hdrs from backup.config import Config - +from .faketime import FakeTime +import json @pytest.mark.asyncio async def test_refresh_known_error(server: SimulationServer, session: ClientSession, config: Config, server_url: URL): @@ -48,3 +49,11 @@ async def test_old_auth_method(server: SimulationServer, session: ClientSession, redirect = URL(r.headers[hdrs.LOCATION]) assert redirect.query.get("creds") is not None assert redirect.host == "example.com" + + +async def test_log_to_firestore(time: FakeTime, server: SimulationServer, session: ClientSession, server_url: URL): + data = {"info": "testing"} + async with session.post(server_url.with_path("logerror"), data=json.dumps(data)) as r: + assert r.status == 200 + assert server._authserver.error_store.last_error is not None + assert server._authserver.error_store.last_error['report'] == data From 17bdd58e41173b49e650e035616f85da07eece08 Mon Sep 17 00:00:00 2001 From: Stephen Beechen Date: Mon, 4 Sep 2023 15:52:25 -0600 Subject: [PATCH 09/14] Add a tool to purge old firestore record --- hassio-google-drive-backup/dev/error_tools.py | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 hassio-google-drive-backup/dev/error_tools.py diff --git a/hassio-google-drive-backup/dev/error_tools.py b/hassio-google-drive-backup/dev/error_tools.py new file mode 100644 index 00000000..3da939c1 --- /dev/null +++ b/hassio-google-drive-backup/dev/error_tools.py @@ -0,0 +1,57 @@ +import argparse +from google.cloud import firestore +from datetime import datetime, timedelta +DELETE_BATCH_SIZE = 200 +STORE_NAME = "error_reports" + + +def delete_old_data(): + # Initialize Firestore + db = firestore.Client() + collection_ref = db.collection(STORE_NAME) + + # Define the datetime for one week ago + week_ago = datetime.now() - timedelta(days=7) + + # Query to find all documents older than a week + total_deleted = 0 + while True: + to_delete = 0 + batch = db.batch() + docs = collection_ref.where('server_time', '<', week_ago).stream() + for doc in docs: + to_delete += 1 + batch.delete(doc.reference) + if to_delete >= DELETE_BATCH_SIZE: + break + if to_delete > 0: + batch.commit() + total_deleted += to_delete + print(f"Deleted {to_delete} documents ({total_deleted} total)") + else: + break + print(f"Success: All documents older than a week deleted ({total_deleted} total)") + + +def main(): + # Create command line argument parser + parser = argparse.ArgumentParser() + + # Add purge argument + parser.add_argument("--purge", help="Delete all documents older than a week.", action="store_true") + + # Add any other argument you want in future. For example: + # parser.add_argument("--future_arg", help="Perform some future operation.") + + args = parser.parse_args() + + # Respond to arguments + if args.purge: + confirm = input('Are you sure you want to delete all documents older than a week? (y/n): ') + if confirm.lower() == 'y': + delete_old_data() + else: + print("Abort: No documents were deleted.") + +if __name__ == "__main__": + main() \ No newline at end of file From 82380792053adb003e48eddb593a2b410c624d8f Mon Sep 17 00:00:00 2001 From: Stephen Beechen Date: Mon, 4 Sep 2023 15:53:16 -0600 Subject: [PATCH 10/14] Add the heroku instance as a backup before Google Drive --- hassio-google-drive-backup/backup/config/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hassio-google-drive-backup/backup/config/settings.py b/hassio-google-drive-backup/backup/config/settings.py index ddbd6be4..f3979789 100644 --- a/hassio-google-drive-backup/backup/config/settings.py +++ b/hassio-google-drive-backup/backup/config/settings.py @@ -248,7 +248,7 @@ def key(self): # Remote endpoints Setting.AUTHORIZATION_HOST: "https://habackup.io", - Setting.TOKEN_SERVER_HOSTS: "https://token1.habackup.io,https://habackup.io", + Setting.TOKEN_SERVER_HOSTS: "https://token2.habackup.io,https://token1.habackup.io,https://habackup.io", Setting.SUPERVISOR_URL: "", Setting.SUPERVISOR_TOKEN: "", Setting.DRIVE_URL: "https://www.googleapis.com", From c10166c90c95b0ee051d298ab8aedee8369a129b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 06:03:13 +0000 Subject: [PATCH 11/14] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/lint.yaml | 2 +- .github/workflows/prod_push.yaml | 2 +- .github/workflows/pytest.yml | 2 +- .github/workflows/server_image_push.yml | 2 +- .github/workflows/staging_push.yml | 4 ++-- .github/workflows/test_staging_push.yml | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a63b2659..cb95db24 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index c973fd45..6441cdba 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest steps: - name: ⤵️ Check out code from GitHub - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 🚀 Run Home Assistant Add-on Linter uses: frenck/action-addon-linter@v2.13 with: diff --git a/.github/workflows/prod_push.yaml b/.github/workflows/prod_push.yaml index afeb6165..3a7d41dd 100644 --- a/.github/workflows/prod_push.yaml +++ b/.github/workflows/prod_push.yaml @@ -12,7 +12,7 @@ jobs: python-version: '3.8' - name: Check out dev repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: dev persist-credentials: false diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index c285ed91..eb1b37f7 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -7,7 +7,7 @@ jobs: run-pytest: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: diff --git a/.github/workflows/server_image_push.yml b/.github/workflows/server_image_push.yml index 77334b7c..2cb0e601 100644 --- a/.github/workflows/server_image_push.yml +++ b/.github/workflows/server_image_push.yml @@ -16,7 +16,7 @@ jobs: contents: read steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build image run: docker build -f hassio-google-drive-backup/Dockerfile-server --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" hassio-google-drive-backup/. diff --git a/.github/workflows/staging_push.yml b/.github/workflows/staging_push.yml index ad912927..23c492d0 100644 --- a/.github/workflows/staging_push.yml +++ b/.github/workflows/staging_push.yml @@ -24,11 +24,11 @@ jobs: with: python-version: '3.8' # Check out the current branch - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: path: dev # Check out the staging barnch - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: path: staging repository: sabeechen/hgdb-dev-staging diff --git a/.github/workflows/test_staging_push.yml b/.github/workflows/test_staging_push.yml index 0049ded2..d95e7449 100644 --- a/.github/workflows/test_staging_push.yml +++ b/.github/workflows/test_staging_push.yml @@ -15,13 +15,13 @@ jobs: python-version: '3.8' - name: Check out dev repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: dev persist-credentials: false - name: Checkout Staging Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: staging repository: sabeechen/hgdb-dev-staging From dc81c67a9efdb85234b63e9582801c527640823e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 06:56:16 +0000 Subject: [PATCH 12/14] Bump docker/login-action from 2.2.0 to 3.0.0 Bumps [docker/login-action](https://github.com/docker/login-action) from 2.2.0 to 3.0.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v2.2.0...v3.0.0) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/prod_push.yaml | 2 +- .github/workflows/test_staging_push.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prod_push.yaml b/.github/workflows/prod_push.yaml index afeb6165..0da532c1 100644 --- a/.github/workflows/prod_push.yaml +++ b/.github/workflows/prod_push.yaml @@ -18,7 +18,7 @@ jobs: persist-credentials: false - name: Login to DockerHub - uses: docker/login-action@v2.2.0 + uses: docker/login-action@v3.0.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} diff --git a/.github/workflows/test_staging_push.yml b/.github/workflows/test_staging_push.yml index 0049ded2..91d9f6a6 100644 --- a/.github/workflows/test_staging_push.yml +++ b/.github/workflows/test_staging_push.yml @@ -33,7 +33,7 @@ jobs: python3 staging/update.py dev staging - name: Login to DockerHub - uses: docker/login-action@v2.2.0 + uses: docker/login-action@v3.0.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} From 033962855780ebcd26b2e92073996bf123191bd7 Mon Sep 17 00:00:00 2001 From: Stephen Beechen Date: Sun, 15 Oct 2023 12:32:54 -0600 Subject: [PATCH 13/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e1fdedb4..0a21e341 100644 --- a/README.md +++ b/README.md @@ -266,7 +266,7 @@ The add-on will only delete an old backup if a new one exists to replace it, so The add-on uses the supervisor to create backups, and the supervisor only permits you to include or exclude the 5 main folders (home assistant configuration, share, SSL, media, and local add-ons). Excluding specific subfolders, or only including specific subfolders from a backup isn't possible today. -### I'm getting weird errors. Where do I look for more detils about an error (Supervisor logs). +### I'm getting weird errors. Where do I look for more detils about an error (Supervisor logs). The addon uses Home Assistant's "supervisor" to create and delete backups on Home Asisstant's side. In case you don't know, the supervisor is something that runs in the background on Home Assistant and manages stuff like backups, connections to hardware, and setting up the environment that Home Assistant Core (eg the UI) and addons run in. Because of this a lot of errors you run into (problems with the NAS, HD corruption, etc) only show up in the supervisor's logs. The supervisor's logs are kind of hidden by default, to view them: From e54d33f0616617a6ccb973f9b2ea2e0abb63d1d7 Mon Sep 17 00:00:00 2001 From: Stephen Beechen Date: Sun, 15 Oct 2023 12:34:09 -0600 Subject: [PATCH 14/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0a21e341..b8f4e491 100644 --- a/README.md +++ b/README.md @@ -266,7 +266,7 @@ The add-on will only delete an old backup if a new one exists to replace it, so The add-on uses the supervisor to create backups, and the supervisor only permits you to include or exclude the 5 main folders (home assistant configuration, share, SSL, media, and local add-ons). Excluding specific subfolders, or only including specific subfolders from a backup isn't possible today. -### I'm getting weird errors. Where do I look for more detils about an error (Supervisor logs). +### I'm getting weird errors. Where do I look for more detils about an error (Supervisor logs). The addon uses Home Assistant's "supervisor" to create and delete backups on Home Asisstant's side. In case you don't know, the supervisor is something that runs in the background on Home Assistant and manages stuff like backups, connections to hardware, and setting up the environment that Home Assistant Core (eg the UI) and addons run in. Because of this a lot of errors you run into (problems with the NAS, HD corruption, etc) only show up in the supervisor's logs. The supervisor's logs are kind of hidden by default, to view them: