Subject | Image based VM backup and Firebird? |
---|---|
Author | Kjell Rilbe |
Post date | 2017-10-05T13:18:07Z |
Hi,
We're considering a move from a physical server to a virtualized one for our Firebird database. I know this will be somewhat slower than a physical server with the same underlying hardware, but there are other gains, re. flexibility and more.
Now, as far as I understand, FB with forced writes on will always have a consistent state on disk, so a backup solution that takes an instant snapshot of the file system will be guaranteed to contain a consistent database file. Is this correct?
But... for performance reasons, we are using FB with forced writes off. In this case, I assume that a consistent state on disk cannot be guaranteed, i.e. it would be dependent on the OS disk write cache, which can potentially reorder disk writes. Is this also correct?
Further, to achieve a guaranteed consistent state on disk, I would propose to lock the file using nbackup, then make the file system backup, and finally unlock the database. Would that be a good approach?
Assuming the file system backup does take a full file system snapshot when backup starts, is it correct that the database file could be unlocked (using nbackup) as soon as the snapshot has been initialized, and not have to wait until the backup copy is complete?
As an alternative, I assume I could do a regular nbackup based multi-level backup inside the VM. The backup files that it produces would of course be correctly backed up by the image based VM-external backup system. Would that perhaps be a better approach?
Are there any other things to consider and/or other ways to approach a good backup solution with FB in a VM?
Regards,
Kjell
We're considering a move from a physical server to a virtualized one for our Firebird database. I know this will be somewhat slower than a physical server with the same underlying hardware, but there are other gains, re. flexibility and more.
Now, as far as I understand, FB with forced writes on will always have a consistent state on disk, so a backup solution that takes an instant snapshot of the file system will be guaranteed to contain a consistent database file. Is this correct?
But... for performance reasons, we are using FB with forced writes off. In this case, I assume that a consistent state on disk cannot be guaranteed, i.e. it would be dependent on the OS disk write cache, which can potentially reorder disk writes. Is this also correct?
Further, to achieve a guaranteed consistent state on disk, I would propose to lock the file using nbackup, then make the file system backup, and finally unlock the database. Would that be a good approach?
Assuming the file system backup does take a full file system snapshot when backup starts, is it correct that the database file could be unlocked (using nbackup) as soon as the snapshot has been initialized, and not have to wait until the backup copy is complete?
As an alternative, I assume I could do a regular nbackup based multi-level backup inside the VM. The backup files that it produces would of course be correctly backed up by the image based VM-external backup system. Would that perhaps be a better approach?
Are there any other things to consider and/or other ways to approach a good backup solution with FB in a VM?
Regards,
Kjell
--
Kjell Rilbe
Kjell Rilbe
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
Marknadsinformation i Sverige AB
Ulvsundavägen 106C
168 67 Bromma
www.marknadsinformation.se
08-514 905 90