mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-04-25 05:35:57 +03:00
[PR #168] feat: Add filter option for pg_dump #170
Labels
No labels
bug
confirmed next step
duplicate
enhancement
help wanted
in progress
in progress
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pgbackweb#170
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/eduardolat/pgbackweb/pull/168
Author: @gautamsi
Created: 1/25/2026
Status: 🔄 Open
Base:
develop← Head:feature/add-filter-option📝 Commits (10+)
a1c38a1Merge pull request #142 from eduardolat/develop70e0d9eMerge pull request #156 from eduardolat/develop20904a1Initial plan73b16d6Initial exploration - understanding backup configuration structuref1ae62dAdd filter option for backup configuration with text and guided modes02e7eccFormat prebuild.mjs with prettierc93e927Fix code review issues - proper error handling and validation87226adAdd PostgreSQL version compatibility for filter feature78eefcdSupport include filters in legacy mode (PG 13-16)4268f7bfix code rabbit comments📊 Changes
11 files changed (+663 additions, -9 deletions)
View changed files
➕
internal/database/migrations/20251216081402_add_filter_content_to_backups.sql(+9 -0)📝
internal/integration/postgres/postgres.go(+98 -0)📝
internal/service/backups/create_backup.sql(+2 -2)📝
internal/service/backups/update_backup.sql(+2 -1)📝
internal/service/executions/run_execution.go(+7 -6)📝
internal/service/executions/run_execution.sql(+1 -0)📝
internal/view/web/dashboard/backups/common.go(+61 -0)📝
internal/view/web/dashboard/backups/create_backup.go(+180 -0)📝
internal/view/web/dashboard/backups/edit_backup.go(+191 -0)➕
prebuild-simple.mjs(+61 -0)➕
prebuild.mjs(+51 -0)📄 Description
I needed a way to exclude table data for several large tables to make use of nightly export for developer use.
decided to add that feature, then I saw --filter option in latest postgres which makes use of a filter file containing multiple include exclude things
This PR adds support for --filter parameter in postgres 17+
Later I updated this to translate the value from this config to legacy --table, --exclude-table etc (only for table schema and table_data) for lower postgres version.
this is how it looks on backup config
there is another modal for help on this filter option

There is also a guided mode on this which allows you to select specific options and minimize human errors

I have tested that manually in local dev container with postgres 15 and 17
Summary by CodeRabbit
New Features
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.