Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e8b4de017 | |||
| 3cece29758 | |||
| 1b04cfa554 | |||
| ad43624925 | |||
| 8d8676bde7 | |||
| 630d08f506 | |||
| b03cc94e5e | |||
| 9978d84d16 | |||
| d5af00327f | |||
| 679bcc4ce8 | |||
| 563641ac48 | |||
|
aaa0711fa4
|
|||
| 818ec9bc13 | |||
|
af3d655c8f
|
|||
| 1936226bf5 | |||
| 0865766102 | |||
| 475484928f | |||
| 8ae0634c82 | |||
| ca1e0ec1c3 | |||
| 14b65c2ecd | |||
| c5994bd7e4 |
@@ -0,0 +1,33 @@
|
||||
if [ "$1" == "pre-backup" ]; then
|
||||
# Remove any existing db dump and then create a new one
|
||||
rm -rf $DATA_DIR/postgres/postgres-backup
|
||||
source /baserow/data/.pgpass
|
||||
PGPASSWORD=$DATABASE_PASSWORD pg_dump -j 2 -h localhost -U baserow baserow --format=directory -f $DATA_DIR/postgres/postgres-backup
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" == "post-backup" ]; then
|
||||
# rm -rf $DATA_DIR/postgres/postgres-backup
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" == "pre-restore" ]; then
|
||||
pkill -STOP -f "webfrontend"
|
||||
pkill -STOP -f "celery"
|
||||
pkill -STOP -f "caddy"
|
||||
|
||||
# Disconnect any remaining idle sessions from the 'baserow' database
|
||||
# This prevents "database is being accessed by other users" errors during pg_restore -c
|
||||
source /baserow/data/.pgpass
|
||||
PGPASSWORD=$DATABASE_PASSWORD psql -h localhost -U baserow -d postgres -c "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'baserow' AND pid <> pg_backend_pid();"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" == "post-restore" ]; then
|
||||
source /baserow/data/.pgpass
|
||||
PGPASSWORD=$DATABASE_PASSWORD pg_restore -j 2 -h localhost -U baserow -d baserow -c $DATA_DIR/postgres/postgres-backup
|
||||
pkill -CONT -f "webfrontend"
|
||||
pkill -CONT -f "celery"
|
||||
pkill -CONT -f "caddy"
|
||||
exit
|
||||
fi
|
||||
+15
-4
@@ -3,7 +3,7 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: baserow/baserow:1.35.3
|
||||
image: baserow/baserow:2.3.0
|
||||
networks:
|
||||
- proxy
|
||||
environment:
|
||||
@@ -30,20 +30,31 @@ services:
|
||||
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||
- "backupbot.backup=true"
|
||||
- "backupbot.backup.path=/baserow/data"
|
||||
- "coop-cloud.${STACK_NAME}.version=1.2.2+1.35.3"
|
||||
- "backupbot.backup.pre-hook=/backup.sh pre-backup"
|
||||
- "backupbot.backup.post-hook=/backup.sh post-backup"
|
||||
- "backupbot.restore.post-hook=/backup.sh post-restore"
|
||||
- "coop-cloud.${STACK_NAME}.version=2.3.2+2.3.0"
|
||||
healthcheck:
|
||||
test: ["CMD", "./baserow.sh", "backend-cmd", "backend-healthcheck"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 1m
|
||||
|
||||
volumes:
|
||||
- baserow_data:/baserow/data
|
||||
|
||||
configs:
|
||||
- source: backup-postgres
|
||||
target: /backup.sh
|
||||
mode: 0777
|
||||
|
||||
volumes:
|
||||
baserow_data:
|
||||
|
||||
configs:
|
||||
backup-postgres:
|
||||
name: ${STACK_NAME}_backup-postgres_${PG_BACKUP_CONFIG_VERSION}
|
||||
file: ./backup-postgres.sh
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Backup/restore of the postgres database backend will now use pg_dump and pg_restore
|
||||
@@ -0,0 +1,3 @@
|
||||
= 1 Breaking Change =
|
||||
|
||||
[Builder] Data source now return content with human property names instead of technical ones #4135
|
||||
@@ -0,0 +1,3 @@
|
||||
See release notes here ->
|
||||
|
||||
https://baserow.io/blog/baserow-2-2-release-notes
|
||||
Reference in New Issue
Block a user