I decided to write this post because recently I have met again a situation when NetBackup schedulers have been used incorrectly 🙂 Let's discuss the following areas:
- NetBackup type of backup types.
- NetBackup scheduler types.
- How NetBackup determines files are due for backup?
- How NetBackup calculates frequency based schedules?
NetBackup - type of scheduler and backups
In NetBackup, there are following type of backups:
- Full Backup.
- Differential Incremental Backup.
- Cumulative Incremental Backup.
- User Backup.
- User Archive.
- Application and Automatic Backup.
- Transaction Log backup.
Full Backup
I think everybody knows Full Backup type. When you choose this type, all of the files that are specified in the backup selections list for the policy will be backed up. The files are backed up, regardless of when the files were last modified or backed up.
Differential and Cumulative Incremental Backups
These types of backup are often mislead. Let's back to backup basics. We can use incremental and differential backups. Incremental backup backs up the data that changed since the last full or differential backup. Differential backup backs up the data that changed since the last full backup. In NetBackup (I don't know why, Veritas should change it...) we have differential incremental backup and cumulative incremental backup.... "Incremental" misleads a little bit... Simply put:
differential incremental backup = incremental backup
cumulative incremental backup = differential backup
You should always run/schedule a full backup before an incremental backup. However, if NetBackup detects no full backup was never run before, the incremental changes to full backup 😉
User Backup or Archive
Now we have two user sides scheduler types: backup and archive. Both are initiated from the client side (Backup, Archive and Restore GUI or CLI). A user backup backs up all files that user specifies and user can start/run backup only during the times/schedules that are allowed on the schedule Start Window tab. Archive is similar but the difference is that files are deleted from source when a backup job is successful. Although, user backup or archive are manual scheduler... you can automate it. For more information please follow post how to archive files using a NetBackup policy?
Application, Automatic and Transaction Log Backup
Application type is used for Microsoft SQL backups (up to NetBackup 7.6.x). This schedule creates a window in which backups can run, but does not define when the backup runs. It's why you need to add the second (Automatic) to schedule jobs.
Since NetBackup 7.7, you can use NetBackup SQL Intelligent Policy and also Transcation Log Backup to protect Microsoft databases and logs.
How NetBackup determines files are due for backup?
To determine which files (only during differential or cumulative backup) should be backed up, NetBackup can use the following attributes on Windows clients:
- an archive bit or
- time stamp of last backup
By default, NetBackup uses an archive bit. Depends on type of backup, an archive bit can be cleared or not:
- Full Backup - all files are backed up and archive bits are cleared.
- Differential Incremental Backup - files that have the archive bits set are backed up. Then the archive bits are cleared.
- Cumulative Incremental Backup - files that the archive bits set are backed up. The archive bits are not cleared after backup.
You can see similar behavior if the time stamp is used.
On Unix clients, NetBackup determines which files should be backed up using a reference date:
- mtime - the file modification time.
- atime - the file access time.
- ctime - the inode change time.
NetBackup uses mtime and atime together by default.
How NetBackup calculates frequency based schedules?
We can use two types of schedule type:
- Calendar - you can create a job schedule based on a calendar view:
- Frequency - you can specify how much time must elapse between the successful completion of a scheduled task and the next attempt.
I got used to use Calendar schedule type because some years ago I read an article about frequency based schedules and possible problems 😉 Fortunately I could find the article (5 years old) where you can read info about criteria used by NetBackup during calculating the next due time of frequency based schedules. Generally, if multiple frequency based backups are in a policy, the next due time will be computed based on the most recent last backup, ignoring schedules of shorter frequency.
Conclusion
I hope that NetBackup schedule and backup types are understandable for you 🙂 There are other scheduler types but not so popular such as Automatic Vault or Vault Catalog Backup. I'm going to write a separate post about Vault.