1. Tak.Lomax1983 wrote: Sun Aug 25, 2024 9:12 pm Dwa pytania:
1. Czy polecenie "./supla.sh backup" robi też kopie bazy danych?
2. Jak się przywraca stworzony backup?
2. Przeczytaj tu https://forum.supla.org/viewtopic.php?t=3078
1. Tak.Lomax1983 wrote: Sun Aug 25, 2024 9:12 pm Dwa pytania:
1. Czy polecenie "./supla.sh backup" robi też kopie bazy danych?
2. Jak się przywraca stworzony backup?
supla-serverroot@Serwer:/volume1/docker/supla# docker logs --tail=50 supla-cloud
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'supla.supla_clie
nt' doesn't exist
In Statement.php line 130:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'supla.supla_clie
nt' doesn't exist
supla:clean:disable-demo-client-apps [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>
supla:generate-schedules-executions
-----------------------------------
In ExceptionConverter.php line 49:
An exception occurred while executing a query: SQLSTATE[42S02]: Base table
root@Serwer:/volume1/docker/supla#
In Exception.php line 28:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'supla.supla_sche
dule' doesn't exist
In Statement.php line 130:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'supla.supla_sche
dule' doesn't exist
supla:generate-schedules-executions [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>
supla:cyclic:send-server-messages
---------------------------------
172.19.0.3:443 172.19.0.1 - - [26/Aug/2024:16:28:09 +0000] "GET / HTTP/1.1" 200 2971 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
172.19.0.3:443 172.19.0.1 - - [26/Aug/2024:16:28:09 +0000] "GET /api/server-info HTTP/1.1" 500 1968 "https://moja.domena.pl/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
172.19.0.3:80 127.0.0.1 - - [26/Aug/2024:16:28:27 +0000] "HEAD /api/server-info HTTP/1.1" 301 262 "-" "Wget/1.21"
Database connection has been established.
[OK] Metadata storage synchronized
[notice] Migrating up to SuplaBundle\Migrations\Migration\Version20240607174322
root@Serwer:/volume1/docker/supla# docker logs --tail=50 supla-server
2024-08-26 16:29:33,381 INFO exited: supla-server (exit status 1; not expected)
2024-08-26 16:29:34,383 INFO spawned: 'supla-scheduler' with pid 29
2024-08-26 16:29:34,384 INFO spawned: 'supla-server' with pid 30
INFO[16:29:34.391201] Scheduler version 23.05
INFO[16:29:34.391711] Started at Mon Aug 26 16:29:34 2024le 'supla.supla_sche
ERR[16:29:34.395402] Incorrect database version! Expected: 20240607174322
INFO[16:29:34.400467] Server version 24.06.01 [Protocol v24]
INFO[16:29:34.400540] Started at Mon Aug 26 16:29:34 2024
2024-08-26 16:29:34,400 INFO exited: supla-scheduler (exit status 1; not expected)
2024-08-26 16:29:35,402 INFO success: supla-server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
ERR[16:29:35.490185] Incorrect database version! Expected: 20240607174322sche
2024-08-26 16:29:36,495 INFO spawned: 'supla-scheduler' with pid 31
2024-08-26 16:29:36,496 INFO exited: supla-server (exit status 1; not expected)
INFO[16:29:36.505862] Scheduler version 23.05
INFO[16:29:36.505946] Started at Mon Aug 26 16:29:36 2024et] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>
2024-08-26 16:29:36,507 INFO spawned: 'supla-server' with pid 32
INFO[16:29:36.523400] Server version 24.06.01 [Protocol v24]
INFO[16:29:36.523456] Started at Mon Aug 26 16:29:36 2024
ERR[16:29:37.180270] Incorrect database version! Expected: 20240607174322
ERR[16:29:37.181087] Incorrect database version! Expected: 20240607174322
2024-08-26 16:29:37,181 INFO exited: supla-scheduler (exit status 1; not expected)
2024-08-26 16:29:38,184 INFO success: supla-server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
2024-08-26 16:29:38,184 INFO exited: supla-server (exit status 1; not expected)o HTTP/1.1" 500 1968 "https://moja.domena.pl/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.3
2024-08-26 16:29:39,187 INFO spawned: 'supla-server' with pid 33
INFO[16:29:39.202173] Server version 24.06.01 [Protocol v24]AD /api/server-info HTTP/1.1" 301 262 "-" "Wget/1.21"
INFO[16:29:39.202763] Started at Mon Aug 26 16:29:39 2024
ERR[16:29:39.205442] Incorrect database version! Expected: 20240607174322
2024-08-26 16:29:39,207 INFO exited: supla-server (exit status 1; not expected)
2024-08-26 16:29:40,209 INFO spawned: 'supla-scheduler' with pid 34
2024-08-26 16:29:40,210 INFO spawned: 'supla-server' with pid 35n20240607174322
INFO[16:29:40.217453] Scheduler version 23.05
INFO[16:29:40.217518] Started at Mon Aug 26 16:29:40 2024
ERR[16:29:40.221406] Incorrect database version! Expected: 20240607174322
2024-08-26 16:29:40,222 INFO exited: supla-scheduler (exit status 1; not expected)
INFO[16:29:40.226256] Server version 24.06.01 [Protocol v24]
INFO[16:29:40.226312] Started at Mon Aug 26 16:29:40 2024
2024-08-26 16:29:40,226 INFO gave up: supla-scheduler entered FATAL state, too many start retries too quickly
ERR[16:29:40.228312] Incorrect database version! Expected: 20240607174322
2024-08-26 16:29:40,230 INFO exited: supla-server (exit status 1; not expected)
2024-08-26 16:29:42,233 INFO spawned: 'supla-server' with pid 36
INFO[16:29:42.248475] Server version 24.06.01 [Protocol v24]
INFO[16:29:42.248579] Started at Mon Aug 26 16:29:42 2024
ERR[16:29:42.251109] Incorrect database version! Expected: 20240607174322
2024-08-26 16:29:42,252 INFO exited: supla-server (exit status 1; not expected)
2024-08-26 16:29:45,257 INFO spawned: 'supla-server' with pid 37
INFO[16:29:45.271693] Server version 24.06.01 [Protocol v24]
INFO[16:29:45.271787] Started at Mon Aug 26 16:29:45 2024
ERR[16:29:45.274025] Incorrect database version! Expected: 20240607174322
2024-08-26 16:29:45,275 INFO exited: supla-server (exit status 1; not expected)
2024-08-26 16:29:46,277 INFO gave up: supla-server entered FATAL state, too many start retries too quickly
Z tego co widać ma zrzucie, to backup nie został przywrócony.Lomax1983 wrote: Mon Aug 26, 2024 4:47 pm Dla testów chciałem przećwiczyć przywracanie backupu i coś nie pykło.
Zrobiłem kopię zapasową poleceniem ./supla.sh backup
Następnie usunęłam urządzenia z clouda, i chciałem przywrócić kopię zapasową polecaniem które jest przytoczone w sugerowanym linku do poczytania:
Zrzut ekranu 2024-08-26 183650.png
Po uruchomieniu pojawiło się to:
Zrzut ekranu 2024-08-26 183638.png
Po restarcie kontenery ruszyłu, ale gdy chce wejść do clouda to pojawia się błąd 502 Bad Gateway.
Code: Select all
docker cp backup.sql supla-db:/backup.sql
Code: Select all
docker exec -it supla-db /bin/bash
Code: Select all
mysql -u root -p passwd
Code: Select all
CREATE DATABASE supla; // jeśli baza nie istnieje
USE supla;
source /backup.sql;
Tak, wcześniej go rozpakujLomax1983 wrote: Mon Aug 26, 2024 5:27 pm Moj plik backupu nazywa się "supla08252024225602.sql.gz" Czy muszę podawać jego nazwę?
Code: Select all
gzip -d supla08252024225602.sql.gz
Ktoś może wie w czym problem?In Exception.php line 28:
SQLSTATE[HY000] [1045] Access denied for user 'supla'@'172.19.0.3' (using p
assword: YES)
In Driver.php line 34:
SQLSTATE[HY000] [1045] Access denied for user 'supla'@'172.19.0.3' (using p
assword: YES)
In ExceptionConverter.php line 101:
An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied f
or user 'supla'@'172.19.0.3' (using password: YES)
In Exception.php line 28:
SQLSTATE[HY000] [1045] Access denied for user 'supla'@'172.19.0.3' (using p
assword: YES)
In Driver.php line 34:
SQLSTATE[HY000] [1045] Access denied for user 'supla'@'172.19.0.3' (using p
assword: YES)
In ExceptionConverter.php line 101:
An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied f
or user 'supla'@'172.19.0.3' (using password: YES)
In Exception.php line 28:
SQLSTATE[HY000] [1045] Access denied for user 'supla'@'172.19.0.3' (using p
assword: YES)
In Driver.php line 34:
SQLSTATE[HY000] [1045] Access denied for user 'supla'@'172.19.0.3' (using p
assword: YES)