Skip to content

mucsi96/postgres-backup-tool

Repository files navigation

postgres-backup-tool

Simple PostgreSQL backup tool to S3 Object Storage with UI

PostgreSQL backup tool screenshot

Features

  • List tables and records of actual database
  • Show last backup time
  • Create backups with retention period
  • Cleanup expired backups
  • Restore backups
  • Exclude tables from backup
  • Can be used without UI as REST API. For example using a cronjob and curl
  • Fully covered with E2E Selenium tests
  • Compatible with PostgreSQL 16
  • Tested with Cloudflare R2 Object Storage

Stack

  • Java 21
  • Spring Boot 3
  • Web Components
  • Java AWS SDK 2.x

Required environment variables

  • AWS_S3_ENDPOINT_URL
  • AWS_S3_ACCESS_KEY_ID
  • AWS_S3_SECRET_ACCESS_KEY
  • AWS_S3_BUCKET
  • AWS_S3_REGION
  • POSTGRES_HOSTNAME
  • POSTGRES_PORT
  • POSTGRES_DB
  • POSTGRES_USER
  • POSTGRES_PASSWORD
  • SPRING_ACTUATOR_PORT

Optional environment variables

  • EXCLUDE_TABLES - Comma-separated list of tables to exclude during backup

Resources

Playwright for Java