diff --git a/.env.example b/.env.example index 64b3e97..67f29e5 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,4 @@ +POSTGRESQL_DB_PG_16=host=localhost port=10016 password=password-_-12!@#$%^&*()/;><.,]}{[ user=user-_-12!@#$%^&*()/;><.,]}{[ db=database-_-12!@#$%^&*()/;><.,]}{[ cron_rule=* * * * * POSTGRESQL_DB_PG_15=host=localhost port=10015 password=password-_-12!@#$%^&*()/;><.,]}{[ user=user-_-12!@#$%^&*()/;><.,]}{[ db=database-_-12!@#$%^&*()/;><.,]}{[ cron_rule=* * * * * POSTGRESQL_DB_PG_14=host=localhost port=10014 password=password-_-12!@#$%^&*()/;><.,]}{[ user=user-_-12!@#$%^&*()/;><.,]}{[ db=database-_-12!@#$%^&*()/;><.,]}{[ cron_rule=* * * * * POSTGRESQL_DB_PG_13=host=localhost port=10013 password=password-_-12!@#$%^&*()/;><.,]}{[ user=user-_-12!@#$%^&*()/;><.,]}{[ db=database-_-12!@#$%^&*()/;><.,]}{[ cron_rule=* * * * * diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1faee78..f13246a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,7 +30,7 @@ jobs: run: touch .env - name: Download and start db containers - run: docker compose up -d postgres_15 postgres_14 postgres_13 postgres_12 postgres_11 mysql_57 mysql_80 mariadb_1011 mariadb_1006 mariadb_1005 mariadb_1004 + run: docker compose up -d postgres_16 postgres_15 postgres_14 postgres_13 postgres_12 postgres_11 mysql_57 mysql_80 mariadb_1011 mariadb_1006 mariadb_1005 mariadb_1004 - name: Build image and run tests in container run: docker compose run --rm --build backuper_tests_${{ matrix.arch }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b3d60d4..6fbb306 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,7 +39,7 @@ Both upload providers and backup targets were created with possibility to easly 5. Setup databases - `docker compose up -d postgres_15 postgres_14 postgres_13 postgres_12 postgres_11 mysql_57 mysql_80 mariadb_1011 mariadb_1006 mariadb_1005 mariadb_1004` + `docker compose up -d postgres_16 postgres_15 postgres_14 postgres_13 postgres_12 postgres_11 mysql_57 mysql_80 mariadb_1011 mariadb_1006 mariadb_1005 mariadb_1004` 6. You can run backuper (`--single` here to make all backups immediatly and then exit): diff --git a/README.md b/README.md index 49bf49b..261761d 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Backups are in `zip` format using [7-zip](https://www.7-zip.org/), with strong A ## Supported backup targets -- PostgreSQL (tested on 15, 14, 13, 12, 11) +- PostgreSQL (tested on 16, 15, 14, 13, 12, 11) - MySQL (tested on 8.0, 5.7) - MariaDB (tested on 10.11, 10.6, 10.5, 10.4) - Single file diff --git a/docker-compose.yml b/docker-compose.yml index 9c6e26b..25874c0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ # also used in GH workflows # set up dbs -# docker compose up -d postgres_15 postgres_14 postgres_13 postgres_12 postgres_11 mysql_57 mysql_80 mariadb_1011 mariadb_1006 mariadb_1005 mariadb_1004 +# docker compose up -d postgres_16 postgres_15 postgres_14 postgres_13 postgres_12 postgres_11 mysql_57 mysql_80 mariadb_1011 mariadb_1006 mariadb_1005 mariadb_1004 # run tests amd64 # docker compose run --rm --build backuper_tests_amd64 # run tests arm64 see https://docs.docker.com/build/building/multi-platform/ @@ -10,9 +10,19 @@ # docker compose run --rm --build backuper_acceptance_test_arm64 services: + postgres_16: + restart: "no" + image: postgres:16.0 + environment: + - POSTGRES_PASSWORD=password-_-12!@#$%^&*()/;><.,]}{[ + - POSTGRES_USER=user-_-12!@#$%^&*()/;><.,]}{[ + - POSTGRES_DB=database-_-12!@#$%^&*()/;><.,]}{[ + ports: + - 10016:5432 + postgres_15: restart: "no" - image: postgres:15.1 + image: postgres:15.4 environment: - POSTGRES_PASSWORD=password-_-12!@#$%^&*()/;><.,]}{[ - POSTGRES_USER=user-_-12!@#$%^&*()/;><.,]}{[ @@ -22,7 +32,7 @@ services: postgres_14: restart: "no" - image: postgres:14.6 + image: postgres:14.9 environment: - POSTGRES_PASSWORD=password-_-12!@#$%^&*()/;><.,]}{[ - POSTGRES_USER=user-_-12!@#$%^&*()/;><.,]}{[ @@ -32,7 +42,7 @@ services: postgres_13: restart: "no" - image: postgres:13.8 + image: postgres:13.12 environment: - POSTGRES_PASSWORD=password-_-12!@#$%^&*()/;><.,]}{[ - POSTGRES_USER=user-_-12!@#$%^&*()/;><.,]}{[ @@ -42,7 +52,7 @@ services: postgres_12: restart: "no" - image: postgres:12.12 + image: postgres:12.16 environment: - POSTGRES_PASSWORD=password-_-12!@#$%^&*()/;><.,]}{[ - POSTGRES_USER=user-_-12!@#$%^&*()/;><.,]}{[ @@ -52,7 +62,7 @@ services: postgres_11: restart: "no" - image: postgres:11.16 + image: postgres:11.21 environment: - POSTGRES_PASSWORD=password-_-12!@#$%^&*()/;><.,]}{[ - POSTGRES_USER=user-_-12!@#$%^&*()/;><.,]}{[ @@ -130,6 +140,7 @@ services: restart: "no" platform: linux/amd64 depends_on: + - postgres_16 - postgres_15 - postgres_14 - postgres_13 @@ -153,6 +164,7 @@ services: restart: "no" platform: linux/arm64 depends_on: + - postgres_16 - postgres_15 - postgres_14 - postgres_13 @@ -176,6 +188,7 @@ services: restart: "no" network_mode: "host" depends_on: + - postgres_16 - postgres_15 - postgres_14 - postgres_13 @@ -200,6 +213,7 @@ services: network_mode: "host" platform: linux/amd64 depends_on: + - postgres_16 - postgres_15 - postgres_14 - postgres_13 @@ -224,6 +238,7 @@ services: network_mode: "host" platform: linux/arm64 depends_on: + - postgres_16 - postgres_15 - postgres_14 - postgres_13 diff --git a/docs/backup_targets/postgresql.md b/docs/backup_targets/postgresql.md index 5731e60..c443e7b 100644 --- a/docs/backup_targets/postgresql.md +++ b/docs/backup_targets/postgresql.md @@ -12,7 +12,7 @@ POSTGRESQL_SOME_STRING="host=... password=... cron_rule=..." ``` !!! note - _Any environment variable that starts with "**POSTGRESQL_**" will be handled as PostgreSQL._ There can be multiple files paths definition for one backuper instance, for example `POSTGRESQL_FOO_MY_DB1` and `POSTGRESQL_BAR_MY_DB2`. Supported versions are: 15, 14, 13, 12, 11. Params must be included in value, splited by single space for example `"value1=1 value2=foo"`. +_Any environment variable that starts with "**POSTGRESQL_**" will be handled as PostgreSQL._ There can be multiple files paths definition for one backuper instance, for example `POSTGRESQL_FOO_MY_DB1` and `POSTGRESQL_BAR_MY_DB2`. Supported versions are: 16, 15, 14, 13, 12, 11. Params must be included in value, splited by single space for example `"value1=1 value2=foo"`. ## Params diff --git a/tests/conftest.py b/tests/conftest.py index 6107f02..3d54c93 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -28,6 +28,15 @@ cron_rule="* * * * *", abs_path=Path(__file__).absolute().parent / "const/testfolder", ) +POSTGRES_16 = PostgreSQLTargetModel( + env_name="postgresql_db_15", + cron_rule="* * * * *", + host="postgres_16" if DOCKER_TESTS else "localhost", + port=5432 if DOCKER_TESTS else 10016, + password=SecretStr("password-_-12!@#$%^&*()/;><.,]}{["), + db="database-_-12!@#$%^&*()/;><.,]}{[", + user="user-_-12!@#$%^&*()/;><.,]}{[", +) POSTGRES_15 = PostgreSQLTargetModel( env_name="postgresql_db_15", cron_rule="* * * * *", @@ -129,11 +138,11 @@ ) DB_VERSION_BY_ENV_VAR: dict[str, str] = { - "postgresql_db_15": "15.1", - "postgresql_db_14": "14.6", + "postgresql_db_15": "15.4", + "postgresql_db_14": "14.9", "postgresql_db_13": "13.8", - "postgresql_db_12": "12.12", - "postgresql_db_11": "11.16", + "postgresql_db_12": "12.16", + "postgresql_db_11": "11.21", "mysql_db_80": "8.0.33", "mysql_db_57": "5.7.42", "mariadb_1011": "10.11.2", @@ -147,6 +156,7 @@ POSTGRES_13, POSTGRES_14, POSTGRES_15, + POSTGRES_16, ] ALL_MYSQL_DBS_TARGETS: list[MySQLTargetModel] = [ MYSQL_57,