A practical application
An nbackup-based incremental backup scheme could look like this:
-
Each month a full backup (level 0) is made;
-
Each week a level-1;
-
A level-2 backup daily;
-
A level-3 backup hourly.
As long as all backups are preserved, you can restore the database to its state at any hour in the past.For each restore action, a maximum of four backup files is used.Of course, you schedule things in such a way that the bigger, time-consuming backups are made during off-peak hours.In this case the levels 0 and 1 could be made at weekends, and level 2 at night.
If you don’t want to keep everything for eternity, you can add a deletion schedule:
-
Level-3 backups are deleted after 8 days;
-
Level-2s after a month;
-
Level-1s after six months;
-
Full backups after two years, but the first one of each year is kept.
This is only an example of course.What’s useful in an individual case depends on the application, the size of the database, its activity, etc.