Encrypting a database being backed up using nbackup

16 views
Skip to first unread message

Ertan Küçükoglu

unread,
Dec 15, 2025, 7:24:04 AM (yesterday) Dec 15
to firebird...@googlegroups.com
Hello,

I am using FirebirdSQL 5.0.3 and need to start encrypting a database. When I run the SQL I get the error below

SQL> alter database encrypt with cryptdb;
Statement failed, SQLSTATE = 0A000
unsuccessful metadata update
-ALTER DATABASE failed
-feature is not supported
-Cannot crypt: please wait for nbackup completion

I am indeed using nbackup for taking incremental backups of this database. Midnight level 0 and every hour level 1 backups.

What should I do in order to be able to start the encryption process?

Thanks & Regards,
Ertan

Mark Rotteveel

unread,
Dec 15, 2025, 7:35:32 AM (yesterday) Dec 15
to firebird...@googlegroups.com
The error means that a backup by nbackup is now in progress, or at least
the database is in backup mode; wait for it to be completed (and maybe
pause it until encryption is complete).

Mark
--
Mark Rotteveel

Ertan Küçükoglu

unread,
Dec 15, 2025, 7:58:47 AM (yesterday) Dec 15
to firebird...@googlegroups.com
'Mark Rotteveel' via firebird-support <firebird...@googlegroups.com>, 15 Ara 2025 Pzt, 15:35 tarihinde şunu yazdı:
The error means that a backup by nbackup is now in progress, or at least
the database is in backup mode; wait for it to be completed (and maybe
pause it until encryption is complete).

Hello,

It is not quite possible there is an active nbackup as it runs on every hour and takes less than a minute.
I made sure that there is no nbackup process among the active processes using task manager list and repeated the operation and it still gives me the same error.
It is also not helping quitting and reconnecting the database using isql tool and retrying it again.

I thought it was because there are some level 1 backups in the nbackup history table. It seems I am mistaken.

Thanks & Regards,
Ertan

Dimitry Sibiryakov

unread,
Dec 15, 2025, 8:01:20 AM (yesterday) Dec 15
to firebird...@googlegroups.com
Ertan Küçükoglu wrote 15.12.2025 13:58:
> I thought it was because there are some level 1 backups in the nbackup history
> table. It seems I am mistaken.

`gstat -h` show you database flags. If you see backup mode in it - you must
fix it:
https://www.firebirdsql.org/file/documentation/html/en/firebirddocs/nbackup/firebird-nbackup.html#nbackup-lock-and-backup

--
WBR, SD.

Ertan Küçükoglu

unread,
Dec 15, 2025, 8:55:09 AM (yesterday) Dec 15
to firebird...@googlegroups.com
'Dimitry Sibiryakov' via firebird-support <firebird...@googlegroups.com>, 15 Ara 2025 Pzt, 16:01 tarihinde şunu yazdı:
Hi, I see "Attributes: force write, backup lock" does it mean it is in backup mode?

Thanks & Regards,
Ertan

Dimitry Sibiryakov

unread,
Dec 15, 2025, 8:59:20 AM (yesterday) Dec 15
to firebird...@googlegroups.com
Ertan Küçükoglu wrote 15.12.2025 14:54:
> I see "Attributes: force write, backup lock" does it mean it is in backup mode?

Yes.

--
WBR, SD.

Alexey Kovyazin

unread,
Dec 15, 2025, 8:59:29 AM (yesterday) Dec 15
to firebird...@googlegroups.com
Hello,

What encryption plugin do you use? 

Regards, 
Alexey Kovyazin 

пн, 15 дек. 2025 г., 13:24 Ertan Küçükoglu <ertan.k...@gmail.com>:
--
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:
https://www.firebirdsql.org/donate
---
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/firebird-support/CAH2i4yf9GRwfMXjKYa7-2Odm9MGUXPMVFTKifiMKd5PvcT994A%40mail.gmail.com.

Dimitry Sibiryakov

unread,
Dec 15, 2025, 9:05:08 AM (yesterday) Dec 15
to firebird...@googlegroups.com
Alexey Kovyazin wrote 15.12.2025 14:59:
> What encryption plugin do you use?

It doesn't matter: the error is thrown by crypto manager before plugin loading.

--
WBR, SD.

Ertan Küçükoglu

unread,
Dec 15, 2025, 9:13:12 AM (yesterday) Dec 15
to firebird...@googlegroups.com
Alexey Kovyazin <alexey....@gmail.com>, 15 Ara 2025 Pzt, 16:59 tarihinde şunu yazdı:
Hello,

What encryption plugin do you use? 


Hi, I found some examples from Alexander Peshkoff and modified one of them for internal use.
I used the cryptDB.pas file to be exact.

Thanks & Regards,
Ertan

Ertan Küçükoglu

unread,
Dec 15, 2025, 9:23:40 AM (yesterday) Dec 15
to firebird...@googlegroups.com
'Dimitry Sibiryakov' via firebird-support <firebird...@googlegroups.com>, 15 Ara 2025 Pzt, 16:59 tarihinde şunu yazdı:
Ertan Küçükoglu wrote 15.12.2025 14:54:
> I see "Attributes: force write, backup lock" does it mean it is in backup mode?

   Yes.

This seems to be the reason and encryption was fine after fixing. Thank you.

I wonder what may be the reason for the database to be in a backup state. I am using nbackup and gbak both at different times.
GBAK duration is less than 30 seconds. Runs once at 00:10 everyday.
NBACKUP duration is even less and runs every 0 minute (every hour).
NBACKUP takes level 0 backup at midnight leaving 1 row in the history table, and takes level 1 backup any other hour.
I see no reason for these two backups to overlap.

Dimitry Sibiryakov

unread,
Dec 15, 2025, 9:26:33 AM (yesterday) Dec 15
to firebird...@googlegroups.com
Ertan Küçükoglu wrote 15.12.2025 15:23:
> I wonder what may be the reason for the database to be in a backup state.

Single nbackup crash in process will leave the database in such state. You
must check successful end of backup and raise alert on failure.

--
WBR, SD.

Mark Rotteveel

unread,
4:29 AM (10 hours ago) 4:29 AM
to firebird...@googlegroups.com
On 15/12/2025 15:12, Ertan Küçükoglu wrote:
> Alexey Kovyazin <alexey....@gmail.com
> <mailto:alexey....@gmail.com>>, 15 Ara 2025 Pzt, 16:59 tarihinde
> şunu yazdı:
>
> Hello,
>
> What encryption plugin do you use?
>
>
> Hi, I found some examples from Alexander Peshkoff and modified one of
> them for internal use.
> I used the cryptDB.pas file to be exact.
I hope you significantly modified it, because that example itself uses a
toy encryption that offers no protection whatsoever.

Mark
--
Mark Rotteveel

Ertan Küçükoglu

unread,
4:46 AM (10 hours ago) 4:46 AM
to firebird...@googlegroups.com

'Mark Rotteveel' via firebird-support <firebird...@googlegroups.com>, 16 Ara 2025 Sal, 12:29 tarihinde şunu yazdı:
I hope you significantly modified it, because that example itself uses a
toy encryption that offers no protection whatsoever.

Thanks for the warning.
It is modified to do encryption using AES-CBC 256.
Reply all
Reply to author
Forward
0 new messages