Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal error. Database page XXXXXXXX had been changed during backup (page SCN=YYYYYYY, backup SCN=ZZZZZZZZ) [CORE6457] #6690

Open
firebird-automations opened this issue Dec 21, 2020 · 3 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Lucas Schatz (arvanus)

Hi everybody, just to explain, I`m running nbackup in 20 databases every minute during work time, for 1 year, and I got just 2 times this error so I`m assuming it`s a rare event, but I'm worried that this can corrupt the database at some level....

During nbackup, at level 4 and 5, I got this error:
Internal error. Database page 5160318 had been changed during backup (page SCN=131336, backup SCN=131334)
and (other database in another day)
Internal error. Database page 8067597 had been changed during backup (page SCN=67679, backup SCN=67677)

I`ve got not much information about this, because it occurred only twice this year at an automatic backup system, so no more details, but what I can suspect is that maybe there where two nbackup process running at the same time (improbable)

I`d opened a topic at Google FbSupport, but no response there... so maybe here someone could give more info if I should be concerned or not about this error
https://groups.google.com/g/firebird-support/c/zZUHHfO3s-4

Thanks

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Looks like by some reason database state was changed from "stalled" to "merge" while backup was in progress.
It could happen if someone "unlock"ed database or run "ALTER DATABASE END BACKUP" statement.

I see no harm for database here, but backup process is aborted.

@firebird-automations
Copy link
Collaborator Author

Commented by: Lucas Schatz (arvanus)

Hello Vlad, thanks for your reply!
I`m almost 100% sure this wasn`t manually unlocked, but what I`d seen is this error too (in another day, not related in the same error log):

 lost connection \[ PROBLEM ON "end backup"\. unsuccessful metadata update \-ALTER DATABASE failed \-deadlock \-update conflicts with concurrent update \-concurrent transaction number is 434463421 SQLCODE:\-607 \] 

So I think that there is a small window of opportunity were a previous running nbackup is overlapped by a new one, is it even possible?

Note: I`m using a crontab script that runs nbackup and gzips it every minute, and I`m not verifying if nbackup is already running because I trusted it`s internal control.... should I change it?

Thanks!

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Lucas,

I believe that you should change your approach. I would:

- create 1 job that endlessly loops to continuously create backups and then move the backup file to a "to be archived" folder. {This can result in backups having interval > 1 minute, but will ensure that you are not "stepping over" any existing nbackup jobs.
- create another job which would archive any files in the "to be archived" folder, then move the archive file to an "archived" folder, then delete the source backup file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant