Subject | Re: [firebird-support] Recovering from nbackup errors |
---|---|
Author | Vlad Khorsun |
Post date | 2008-04-16T07:59:50Z |
> I'm currently developing some code that will do automatic database backups forUse nbackup -N (unlock). It starts merge process and Firebird will megre delta
> a 24x7 datalogging application using nbackup. It will do full level 0 backups
> just after midnight on 1st of each month, incremental level 1 backups just
> after midnight every day except the 1st of the month, and a level 2 backup
> every hour except at midnight.
>
> My code was working, but then stopped working and I discovered that a copy of
> the delta file had been left in the database folder. I probably caused the
> problem by stopping my code or Firebird server while nbackup was working -
> these things happen in a development environment. But my question is how can
> I recover from this in a real life environment?
>
> Suppose there is a power failure, or someone stops Firebird while nbackup is
> running, and so it doesn't complete the backup operation. Next time I do a
> backup, I can check if the delta file exists, but how should I handle this
> situation?
into main database file. After it delta will be removed.
> I don't mind losing transactions that are only recorded in the delta file, soYes. Also you may look at header statistics (gstat -h) to see backup state
> can I just delete it? Does the existence of the delta file imply that the
> database is locked,
> and if so should I unlock it and will that fix the problem?Yes.
Regards,
Vlad