Subject Re: [firebird-support] nbackup use
Author Paul Vinkenoog
greg_runnels wrote:

> I'm trying to set up a backup system using nbackup. I am using the suggested scheme of:
> Monthly level 0
> Weekly level 1
> daily level 2
> hourly level 3
> I would like to save the backups for a period of time. For example, the monthly backups I'd like to keep for at least a year. So my backup is named backup_Year_Month.nbk, so it would be backup_2010_11.nbk for November of 2010. Next month it will be backup_2010_12.nbk. My questions is what the level 1 backup is preformed (weekly) how does it know which level 0 backup to use? It looks to me like there can only be one version of each level in the directory used for backup, is this true?

When you *make* the backup, say of level 1, nbackup doesn't have to look at the existing backup files at all. It just backs up the mutations since the last time a level-0 backup was made. This information is kept in the database itself.

When you *restore* from a backup, you have to specify the entire chain of backup files, starting with the level-0 backup. Nbackup checks if the chain is correct. It can do this because each backup file has a unique ID, and every backup file of level 1 or above contains a reference to the ID of the backup it was based on. If your chain is correct, nbackup will restore. If not, it will tell you.

You can save any number of backup files of any level in the same directory. Just as long as *you* can tell them apart and know which backup is based on which, nbackup has no problem with it.


Paul Vinkenoog