On 04/06/2024 11:19, Marcel Zawadzki wrote:
> Hi
> I'm running Firebird 3.0.11 on Linux.
> How can I restore database but with only single table?
> I know that there is -INCLUDE_DATA switch, but it's only available in
> Firebird 5.0 based on
> documentation:
https://www.firebirdsql.org/file/documentation/html/en/firebirddocs/gbak/firebird-gbak.html#gbak-cmdline-include-data
>
> Well, I managed to restore just one table using -SKIP_DATA, but I had to
> get the list of all tables from the database and put inside -SKIP_DATA
> '(table1|table2|...)', but is there any simpler solution? I tested:
>
> 1. '(NOT TABLE_NAME)'
> 2. '(NOT LIKE TABLE_NAME)'
> 3. '(NOT SIMILAR TO TABLE_NAME)'
> 4. '(NOT SIMILAR TO 'TABLE_NAME')'
>
> How should that work? Am I missing something?
What you're trying to do is not possible. In Firebird 5.0, you can use
`-INCLUDE_DATA` instead of `-SKIP_DATA` (though interestingly enough,
this doesn't seem to have been documented in the release notes).
But in Firebird 3.0 and 4.0, you will have to find a regex that includes
all tables except the table name you do want to restore.
Mark
--
Mark Rotteveel