gbak exclude

2 views
Skip to first unread message

Hugo Larson

unread,
Jun 24, 2026, 12:47:30 PM (8 days ago) Jun 24
to Firebird-java



Hello,

I wonder if there is a way to exclude tables when using FBBackupManager like example

gbak -b -se localhost/3050:service_mgr -g -v mydb1 -SKIP_D ‘(COUNTRY|JOB)’

Thanks,
Hugo

Mark Rotteveel

unread,
Jun 24, 2026, 12:56:11 PM (8 days ago) Jun 24
to firebi...@googlegroups.com
On 24-06-2026 16:48, 'Hugo Larson' via firebird-java wrote:
> I wonder if there is a way to exclude tables when using
> FBBackupManager like example
>
> gbak -b -se localhost/3050:service_mgr -g -v mydb1 -SKIP_D ‘(COUNTRY|JOB)’

Support for that (and -INCLUDE_DATA) is not implemented. I'll create a
ticket to add it. As a workaround, override
FBBackupManager.getBackupSRB(FbService, int) and add the correct
information item (isc_spb_bkp_skip_data) and value, e.g.:

@Override
protected ServiceRequestBuffer getBackupSRB(FbService service, int
options) throws SQLException {
ServiceRequestBuffer backupSPB = super.getBackupSRB(service, options);
backupSPB.addArgument(ISCConstants.isc_spb_bkp_skip_data,
"(COUNTRY|JOB)");
return backupSPB;
}

Mark
--
Mark Rotteveel

Hugo Larson

unread,
Jun 25, 2026, 4:24:28 AM (8 days ago) Jun 25
to 'Mark Rotteveel' via firebird-java
Hi Mark,

Thanks

--
Support the ongoing development of Firebird! Consider donating to the Firebird Foundation and help ensure its future. Every contribution makes a difference. Learn more and donate here:
---
You received this message because you are subscribed to the Google Groups "firebird-java" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-jav...@googlegroups.com.

Mark Rotteveel

unread,
Jun 28, 2026, 2:58:10 PM (4 days ago) Jun 28
to firebi...@googlegroups.com
On 24-06-2026 18:56, 'Mark Rotteveel' via firebird-java wrote:
> On 24-06-2026 16:48, 'Hugo Larson' via firebird-java wrote:
>>     I wonder if there is a way to exclude tables when using
>>     FBBackupManager like example
>>
>>     gbak -b -se localhost/3050:service_mgr -g -v mydb1 -SKIP_D
>> ‘(COUNTRY|JOB)’
>
> Support for that (and -INCLUDE_DATA) is not implemented. I'll create a
> ticket to add it.

I've added support in Jaybird 7. Right now, I don't think I'll backport
it to Jaybird 5 and 6, and instead I'll add a generic mechanism to
service managers that can be used to customize the request buffer so
additional properties can be added if support for some feature hasn't
been implemented in Jaybird itself.

That can then be used as a generic workaround for all service managers
for such missing options.

This can then be used like this:


var backupManager = new FBBackupManager();
// Perform other config...
// Set customizer
backupManager.setServiceRequestCustomizer((request, context) -> {
// Only apply for backup
if (!"backupDatabase".equals(context.operation())) return;
request.addArgument(ISCConstants.isc_spb_bkp_include_data,
"(COUNTRY|JOB)")
});
backupManager.backupDatabase();


See also
https://github.com/FirebirdSQL/jaybird/blob/master/devdoc/jdp/jdp-2026-06-service-manager-request-customization.adoc.

Mark
--
Mark Rotteveel
Reply all
Reply to author
Forward
0 new messages